示例#1
0
 public void startServer()
 {
     //gamename:playername:numon server:
     if (serverNameInput.text.Length < 1 || playerNameInput.text.Length < 1 || serverNameInput.text.Contains(":") || playerNameInput.text.Contains(":"))
     {
         Debug.Log("Server and Player Name must be filled and can't contain the symbol ':'");
     }
     else
     {
         playerInput.SetActive(false);
         serverInput.SetActive(false);
         serverB.SetActive(false);
         clientB.SetActive(false);
         endB.SetActive(true);
         LoadCanvas.SetActive(false);
         LobbyCanvas.SetActive(true);
         StartCanvas.SetActive(false);
         Initialize();
         broadcastData = serverNameInput.text + ":" + playerNameInput.text + ":" + 0;
         StartAsServer();
         NetworkLobbyManager.singleton.matchName = serverNameInput.text;
         netmanager.playerName = playerNameInput.text;
         NetworkLobbyManager.singleton.StartHost();
     }
 }
示例#2
0
 public void Jeu()
 {
     Canvas.SetActive(true);
     Player.SetActive(true);
     StartCanvas.SetActive(false);
 }