// Update is called once per frame void Update() { if (Input.GetButtonDown("Submit") || Input.GetButtonDown("Cancel")) { if (gameStarted == false && startGame == false) { startGame = true; startText.gameObject.SetActive(false); tutorialText.gameObject.SetActive(false); effects.PlayOneShot(startSound); StartCoroutine("GameStart"); if (playerAlive == true) { ResetInvencibility(); } else { spawn.ResetGame(); player_Life_Controller.ResetGame(); player_Movement.ResetPlayerOrientation(); points = 0; pointsText.text = points.ToString(); gameEnded = false; playerAlive = true; } } } GameIsPaused(); }