diff --git a/Assets/ML-Agents/Timers/dont touch me plz_timers.json b/Assets/ML-Agents/Timers/dont touch me plz_timers.json index aa801bc..501e763 100755 --- a/Assets/ML-Agents/Timers/dont touch me plz_timers.json +++ b/Assets/ML-Agents/Timers/dont touch me plz_timers.json @@ -1 +1 @@ -{"count":1,"self":19.0202384,"total":19.0566016,"children":{"InitializeActuators":{"count":1,"self":0,"total":0,"children":null},"AgentSendState":{"count":716,"self":0.0039968,"total":0.0039968,"children":null},"DecideAction":{"count":716,"self":0.0313674,"total":0.0313674,"children":null}},"gauges":{},"metadata":{"timer_format_version":"0.1.0","start_time_seconds":"1649863963","unity_version":"2019.4.35f1","command_line_arguments":"D:\\Unity\\2019.4.35f1\\Editor\\Unity.exe -projectpath C:\\Users\\kiril\\real-shooter -useHub -hubIPC -cloudEnvironment production -licensingIpc LicenseClient-kiril -hubSessionId 08b23f90-bb2b-11ec-8f91-71b1a8087934 -accessToken wPoaGUoqAdMDDj6g73Y4y-aTBFUY2UVeaU34xyILphA009f","communication_protocol_version":"1.5.0","com.unity.ml-agents_version":"2.0.1","scene_name":"dont touch me plz","end_time_seconds":"1649863982"}} \ No newline at end of file +{"count":1,"self":30.4209088,"total":30.476561099999998,"children":{"InitializeActuators":{"count":1,"self":0.0009994,"total":0.0009994,"children":null},"AgentSendState":{"count":1272,"self":0.0023281,"total":0.0023281,"children":null},"DecideAction":{"count":1272,"self":0.0513236,"total":0.0513236,"children":null}},"gauges":{},"metadata":{"timer_format_version":"0.1.0","start_time_seconds":"1649867954","unity_version":"2019.4.35f1","command_line_arguments":"D:\\Unity\\2019.4.35f1\\Editor\\Unity.exe -projectpath C:\\Users\\kiril\\real-shooter -useHub -hubIPC -cloudEnvironment production -licensingIpc LicenseClient-kiril -hubSessionId 08b23f90-bb2b-11ec-8f91-71b1a8087934 -accessToken wPoaGUoqAdMDDj6g73Y4y-aTBFUY2UVeaU34xyILphA009f","communication_protocol_version":"1.5.0","com.unity.ml-agents_version":"2.0.1","scene_name":"dont touch me plz","end_time_seconds":"1649867984"}} \ No newline at end of file diff --git a/Assets/Scenes/tyt player/Player.prefab b/Assets/Scenes/tyt player/Player.prefab index 64e6352..5ae9a94 100755 --- a/Assets/Scenes/tyt player/Player.prefab +++ b/Assets/Scenes/tyt player/Player.prefab @@ -504,7 +504,7 @@ PrefabInstance: - target: {fileID: -4216859302048453862, guid: 99fcce1f10b2ebd4a8cd31a345f6bed8, type: 3} propertyPath: m_LocalPosition.x - value: 0.09800026 + value: 0.098 objectReference: {fileID: 0} - target: {fileID: -4216859302048453862, guid: 99fcce1f10b2ebd4a8cd31a345f6bed8, type: 3} @@ -514,7 +514,7 @@ PrefabInstance: - target: {fileID: -4216859302048453862, guid: 99fcce1f10b2ebd4a8cd31a345f6bed8, type: 3} propertyPath: m_LocalPosition.z - value: 0.4849999 + value: 0.81 objectReference: {fileID: 0} - target: {fileID: -4216859302048453862, guid: 99fcce1f10b2ebd4a8cd31a345f6bed8, type: 3} diff --git a/Assets/Scripts/Character/scr_CharacterController.cs b/Assets/Scripts/Character/scr_CharacterController.cs index a9ce67a..f360845 100755 --- a/Assets/Scripts/Character/scr_CharacterController.cs +++ b/Assets/Scripts/Character/scr_CharacterController.cs @@ -49,7 +49,8 @@ public class scr_CharacterController : MonoBehaviour private float cameraHeight; private float cameraHeightVelocity; - private bool isSprinting; + [HideInInspector] + public bool isSprinting; private Vector3 newMovementSpeed; private Vector3 newMovementSpeedVelocity; diff --git a/Assets/Scripts/Weapons/scr_WeaponController.cs b/Assets/Scripts/Weapons/scr_WeaponController.cs index 4099c99..5b3cf6c 100755 --- a/Assets/Scripts/Weapons/scr_WeaponController.cs +++ b/Assets/Scripts/Weapons/scr_WeaponController.cs @@ -42,6 +42,12 @@ public class scr_WeaponController : MonoBehaviour return; } + CalculateWeaponRotation(); + SetWeaponAnimation(); + } + + private void CalculateWeaponRotation() + { weaponAnimator.speed = characterController.weaponAnimationSpeed; targetWeaponRotation.y += settings.SwayAmount * (settings.SwayXInverted ? -characterController.input_View.x : characterController.input_View.x) * Time.deltaTime; @@ -65,4 +71,9 @@ public class scr_WeaponController : MonoBehaviour transform.localRotation = Quaternion.Euler(newWeaponRotation); } + + private void SetWeaponAnimation() + { + weaponAnimator.SetBool("isSprinting", characterController.isSprinting); + } }