示例#1
0
 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;
 }
示例#2
0
/*
 *  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
    }
示例#3
0
 private void LoadLevel(string sceneName)    //zaladuj wybrany level
 {
     SceneManager.LoadScene(sceneName);
     Time.timeScale = 1;
     CoinRotation.changeStop(false);     //Niewazne jaki byl stan wlacz obrot pieniazkow
 }