void Awake()
 {
     health = totalHealth;
     if (characterDeathEvent == null)
     {
         characterDeathEvent = new CharacterDeathEvent();
     }
 }
Beispiel #2
0
 private void OnCharacterDeath(CharacterDeathEvent e)
 {
     CheckWinCondition(e.DeadCharacter.GetComponent <Character>());
 }
Beispiel #3
0
 internal void FireDeathEvent(float currentAge)
 {
     CharacterDeathEvent?.Invoke(currentAge);
 }