public void TogglePauseMenu() { Time.timeScale = Time.timeScale == 0 ? 1 : 0; //pauza pauseMenu.SetActive(!pauseMenu.activeSelf); CoinRotation.changeStop(true); //zaleznie od stanu zmien go na przeciwny moveJoystick.enabled = !moveJoystick.isActiveAndEnabled; boost.enabled = !boost.isActiveAndEnabled; }
/* * public void Death() { * player.transform.position = respawnPoint.position; * Rigidbody rigid = player.GetComponent<Rigidbody>(); * rigid.velocity = Vector3.zero; * rigid.angularVelocity = Vector3.zero; * }*/ public void PlayAgain() //zaladuj wybrany level - dla ,,Play Again" z Pause Menu { SceneManager.LoadScene(SceneManager.GetActiveScene().name); Time.timeScale = 1; CoinRotation.changeStop(false); //Niewazne jaki byl stan wlacz obrot pieniazkow }
private void LoadLevel(string sceneName) //zaladuj wybrany level { SceneManager.LoadScene(sceneName); Time.timeScale = 1; CoinRotation.changeStop(false); //Niewazne jaki byl stan wlacz obrot pieniazkow }