...
This commit is contained in:
@ -20,7 +20,7 @@ public class Player : MonoBehaviour, ICharacter
|
||||
Debug.LogWarning("Pooled object was destroyed");
|
||||
}
|
||||
|
||||
public event Action<object> OnKilledEvent;
|
||||
public event Action<bool> OnDeathEvent;
|
||||
public void GetDamage(float damage)
|
||||
{
|
||||
PlayerCharacter.LastTimeHit = TimeManager.Instance.CurrentTime;
|
||||
@ -28,7 +28,7 @@ public class Player : MonoBehaviour, ICharacter
|
||||
Condition.GiveArmour(-Mathf.RoundToInt(Mathf.Sqrt(damage) * 5));
|
||||
|
||||
if (Condition.HealthPoints < 0)
|
||||
OnKilledEvent?.Invoke(this);
|
||||
OnDeathEvent?.Invoke(true);
|
||||
}
|
||||
|
||||
public void ResetCharacter()
|
||||
|
Reference in New Issue
Block a user