Example #1
0
 private void ProcessHit(DamageDealer damageDealer)
 {
     playerPU.DecreaseHealth(damageDealer.GetDamage());
     damageDealer.Hit();
     if (playerPU.GetHealth() <= 0)
     {
         Die();
         if (lives.GetLivesCount() >= 1)
         {
             lives.DecreaseLives();
             FindObjectOfType <SceneLoader>().LoadCurrentScene();
             playerPU.ResetPowerUps();
         }
         else if (lives.GetLivesCount() < 1)
         {
             FindObjectOfType <SceneLoader>().LoadGameOver();
         }
     }
 }