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);
 }
Exemplo n.º 3
0
 public static void PublishGameLostEvent()
 {
     GameLostEvent?.Invoke();
 }