public void OnClickStartGame()
 {
     PhotonNetwork.CurrentRoom.IsOpen    = false;
     PhotonNetwork.CurrentRoom.IsVisible = false;
     TubeGenerator.Reset();
     PhotonNetwork.LoadLevel(3);
 }
Example #2
0
    public void OnClickExit()
    {
        playSound();

        PlayerPrefs.SetInt("CURRENCY", PlayerController.currencyMeter);
        if (PlayerController.highScore < PlayerController.score)
        {
            PlayerController.highScore = (int)PlayerController.score;
            PlayerPrefs.SetInt("HIGHSCORE", PlayerController.highScore);
        }
        TubeGenerator.Reset();

        SceneManager.LoadScene(0);
    }
Example #3
0
    public void LoadRoomLobby()
    {
        TubeGenerator.Reset();

        StartCoroutine(checkInternetConnection((isConnected) => {
            if (isConnected)
            {
                SceneManager.LoadScene(2);
            }
            else
            {
                messagePanel.printMessage("NO INTERENT, CHECK YOUR INTERNET CONNECTION!");
            }
        }));
    }
Example #4
0
 public void onClickJoinRoom()
 {
     TubeGenerator.Reset();
     PhotonNetwork.JoinRoom(RoomInfo.Name);
 }
Example #5
0
 public void LoadSinglePlayer()
 {
     loadingBar.gameObject.SetActive(true);
     TubeGenerator.Reset();
     StartCoroutine(AsyncLoadScene(1));
 }