Exemplo 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);
     }
 }
Exemplo n.º 2
0
 public void MainMenu()
 {
     OnEnter.setCount(1);
     SceneManager.LoadScene(0, LoadSceneMode.Single);
     Time.timeScale = 1;
 }