latest change
This commit is contained in:
@ -23,6 +23,7 @@ namespace Animators.Leonid_Animator
|
||||
[SerializeField] private float movementSpeed = 5;
|
||||
[SerializeField] private float rotationSpeed = 10;
|
||||
|
||||
public float health = 100f;
|
||||
private void Start()
|
||||
{
|
||||
myRigidbody = GetComponent<Rigidbody>();
|
||||
@ -36,6 +37,12 @@ namespace Animators.Leonid_Animator
|
||||
|
||||
private void Update()
|
||||
{
|
||||
|
||||
if (Input.GetButtonDown("Fire1") && health > 0)
|
||||
{
|
||||
health -= 5;
|
||||
}
|
||||
|
||||
var deltaTime = Time.deltaTime;
|
||||
_inputHandler.TickInput(deltaTime);
|
||||
_moveDirection = _cameraObject.forward * _inputHandler.vertical
|
||||
|
@ -204,6 +204,8 @@ public class NPC : Agent, ICharacter
|
||||
CharacterFactory.Instance.ReSpawn(this, ref pos, ref id);
|
||||
}
|
||||
}
|
||||
|
||||
//public event OnDeathEvent<
|
||||
|
||||
public void ResetCharacter()
|
||||
{
|
||||
|
Reference in New Issue
Block a user