Esempio n. 1
0
    // LOCAL JOIN
    public void OnClickJoin()
    {
        lobbyManager.ChangeTo(lobbyPanel);

        lobbyManager.networkAddress = ipInput.text;
        lobbyManager.StartClient();

        lobbyManager.backDelegate = lobbyManager.StopClientClbk;
        lobbyManager.DisplayIsConnecting();

        lobbyManager.SetServerInfo("Connecting...", lobbyManager.networkAddress);
    }
Esempio n. 2
0
 public void OnClickQuitLobby()
 {
     lobbyManager.ChangeTo(mainPanel);
     lobbyManager.StopHost();
     lobbyManager.StopClient();
     lobbyManager.isHost = false;
 }
    IEnumerator GameEnd()
    {
        yield return(new WaitForSeconds(3));

        LobbyManager lm = GameObject.Find("LobbyManager").GetComponent <LobbyManager>();

        if (isServer)
        {
            lm.StopHost();
            lm.ChangeTo(lm.mainMenuPanel);
        }
        else
        {
            lm.StopClient();
            lm.ChangeTo(lm.mainMenuPanel);
        }
    }
Esempio n. 4
0
 public void OnClickQuitGame()
 {
     Debug.Log("Quitting game!");
     lobbyManager.ChangeTo(mainPanel);
     lobbyManager.Randomize();
     lobbyManager.StopHost();
     lobbyManager.StopClient();
     lobbyManager.isHost = false;
 }
    // single player mode
    public void OnSinglePlayerSurvivalModeClick()
    {
        sceneManager.OnStartButton();
        lobbyManager.ChangeTo(null);

        Destroy(GameObject.Find("MainMenuUI(Clone)"));
        lobbyManager.backDelegate      = lobbyManager.SimpleBackClbk;
        lobbyManager.topPanel.isInGame = true;
        lobbyManager.topPanel.ToggleVisibility(false);
    }
Esempio n. 6
0
 public void OnClickJoin()
 {
     if (ipInput.text.Length > 0)
     {
         lobbyManager.ChangeTo(lobbyPanel);
         lobbyManager.networkAddress = ipInput.text;
         lobbyManager.StartClient();
         startButton.SetActive(false);
         hostCover.SetActive(true);
     }
 }
Esempio n. 7
0
 public void OnClickBack()
 {
     Manager.ChangeTo(MainMenuPanel);
 }
Esempio n. 8
0
 public void OnClickJoin()
 {
     Manager.ChangeTo(JoinPanel);
 }