Finally bots can die. Player to. And another fixes.
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
using UnityEngine;
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Animators.Leonid_Animator.Player
|
||||
{
|
||||
@ -19,15 +20,19 @@ namespace Animators.Leonid_Animator.Player
|
||||
[SerializeField] public float jumpForce;
|
||||
|
||||
[Header("Stats")]
|
||||
[SerializeField] private float movementSpeed = 5;
|
||||
[SerializeField] private float movementSpeed = 25;
|
||||
[SerializeField] private float rotationSpeed = 10;
|
||||
|
||||
private void Start()
|
||||
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
myRigidbody = GetComponent<Rigidbody>();
|
||||
_inputHandler = GetComponent<InputHandler>();
|
||||
myAnimatorHandler = GetComponent<AnimatorHandler>();
|
||||
|
||||
}
|
||||
|
||||
private void Start()
|
||||
{
|
||||
_cameraObject = Camera.main.transform;
|
||||
myTransform = transform;
|
||||
myAnimatorHandler.Initialize();
|
||||
@ -70,6 +75,16 @@ namespace Animators.Leonid_Animator.Player
|
||||
_inputHandler.crouchPressed = false;
|
||||
}
|
||||
|
||||
public Vector3 GetMeshCenter()
|
||||
{
|
||||
if (myAnimatorHandler.isCrouching)
|
||||
return transform.position + 1f * Vector3.up;
|
||||
else
|
||||
{
|
||||
return transform.position + 2f * Vector3.up;
|
||||
}
|
||||
}
|
||||
|
||||
#region Movement
|
||||
|
||||
private Vector3 _normalVector;
|
||||
|
Reference in New Issue
Block a user