This commit is contained in:
2022-05-15 18:24:43 +07:00
parent abf262095f
commit bb6aea8720
22 changed files with 5008 additions and 170 deletions

View File

@ -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()