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