Esempio n. 1
0
 public void ApplyDamage(float damage)
 {
     health -= damage;
     if (health <= 0)
     {
         Instantiate(explosion, transform.position, Quaternion.identity);
         Destroy(this.gameObject);
         OnEnter.setCount(2);
         SceneManager.LoadScene(0, LoadSceneMode.Single);
     }
 }
Esempio n. 2
0
 public void MainMenu()
 {
     OnEnter.setCount(1);
     SceneManager.LoadScene(0, LoadSceneMode.Single);
     Time.timeScale = 1;
 }