latest change
This commit is contained in:
8
Assets/ML-Agents/Timers.meta
generated
8
Assets/ML-Agents/Timers.meta
generated
@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 37213a83bd954b64c910ca7c65cf881f
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -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