Esempio n. 1
0
 //when collided with player
 private void OnCollisionEnter2D(Collision2D collision)
 {
     if (collision.gameObject.tag == LevelTwoTags.PlayerTwo)
     {
         _mainTwo.GameOverClip();
         _uiManagerTwo.DisplayGameOverText();
         Destroy(collision.gameObject);
         levelLoader.LoadMainMenuScene();
     }
 }
Esempio n. 2
0
 //player Damaged
 public void PlayerDamaged()
 {
     StartCoroutine(FlashWhenDamaged(0.1f));
     main.GetDamagedSound();
     lives = lives - 1;
     uiManager.UpdatePlayerLivesUIText(lives);
     if (lives < 1)
     {
         main.GameOverClip();
         uiManager.DisplayGameOverText();
         Destroy(this.gameObject);
         levelLoader.LoadMainMenuScene();
         //ime.timeScale = 0;
     }
 }