private void TakeDamage(int unused) { if (!hasInvulnerability) { hasInvulnerability = true; lifes -= 1; AudioManager.Play(AudioClipName.Lvl1Damage); if (lifes <= 0) { gameLostEvent.Invoke(0); Destroy(gameObject); return; } StartCoroutine(DamageAnim()); } }
private void HandleTimerFinished() { gameLostEvent.Invoke(0); }
public static void PublishGameLostEvent() { GameLostEvent?.Invoke(); }