Артём хуесос
This commit is contained in:
1 parent
5b09068b0c
commit
d3fbd4c5c3
12 files changed
+797
-21
No files matched your search
@@ -34,7 +34,7 @@ namespace Code.Gameplay.Character.Core
|
||||
inputs.MoveAxisForward = moveInput.y; // Vertical ось (W/S или Up/Down)
|
||||
inputs.MoveAxisRight = moveInput.x; // Horizontal ось (A/D или Left/Right)
|
||||
inputs.JumpPressed = _inputService.JumpPressed; // Прыжки (Space)
|
||||
inputs.SprintPressed = _inputService.SprintPressed; // Спринт (Shift)
|
||||
inputs.SprintPressed = true;//_inputService.SprintPressed; // Спринт (Shift)
|
||||
inputs.SlidePressed = _inputService.SlidePressed; // Слайд (Ctrl)
|
||||
inputs.CameraMode = ((ICameraState)_cameraStateMachine.CurrentBaseState).GetCameraMode();
|
||||
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
using KinematicCharacterController;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Code.Gameplay.Player
|
||||
{
|
||||
public class PlayerAnimator : MonoBehaviour
|
||||
{
|
||||
private static readonly int Velocity = Animator.StringToHash("Velocity");
|
||||
|
||||
[SerializeField] private Animator playerAnimator;
|
||||
[SerializeField] private KinematicCharacterMotor kinematicCharacterMotor;
|
||||
|
||||
private void SetVelocity(float velocity)
|
||||
{
|
||||
playerAnimator.SetFloat(Velocity, velocity);
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
SetVelocity(kinematicCharacterMotor.Velocity.magnitude);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2f94efbea729423596ee5c6ee2366c98
|
||||
timeCreated: 1763220863
|
||||
Reference in new issue
Block a user