public void killPlayer() { Instantiate(deathParticle, transform.position, Quaternion.identity); gameOverAus.Play(); userInterface ui = gameManager.GetComponent <userInterface>(); ui.setActiveRestart(true); Destroy(gameObject); }
private void button2_Click(object sender, EventArgs e) { var UI = new userInterface(); UI.Show(); this.Hide(); UI.RefToHome = this; this.Visible = false; }