void OnJoinedRoom() { mainMenuManager.ShowMenu(windowPickSelection.GetComponent <Menu>()); mainMenuManager.loadingScreenObj.SetActive(false); // GIVE THE NAME OF THE PLAYER TO THE PICK SELECTION WINDOW GameObject PickSelectionObj = GameObject.Find("Window_PickSelection_mn"); PickSelection pickSelScript = PickSelectionObj.GetComponent <PickSelection>(); //pickSelScript.PlayerName = PlayerPrefs.GetString("playername"); pickSelScript.CreateLayout(); pickSelScript.CreatePickLayout(); }
public void uLink_OnConnectedToServer() { introSource.Stop(); mainMenuManager.ShowMenu(windowPickSelection.GetComponent <Menu>()); mainMenuManager.loadingScreenObj.SetActive(false); // GIVE THE NAME OF THE PLAYER TO THE PICK SELECTION WINDOW GameObject PickSelectionObj = GameObject.Find("Window_PickSelection_mn"); PickSelection pickSelScript = PickSelectionObj.GetComponent <PickSelection>(); pickSelScript.PlayerName = PlayerPrefs.GetString("playername"); pickSelScript.CreateLayout(); pickSelScript.CreatePickLayout(); }
public void StartServerManual() { Lobby.AddListener(this); //gameServerIP = "127.0.0.1"; //gameServerPort = 7000; Lobby.ConnectAsServer(lobbyIP, lobbyPort); uLink.Network.InitializeServer(32, 7000); mainMenuManager.ShowMenu(windowPickSelection.GetComponent <Menu>()); pickSelectionScript.CreateLayout(); pickSelectionScript.CreatePickLayout(); }
public void StartServerManual() { Lobby.AddListener(this); //gameServerIP = "127.0.0.1"; //gameServerPort = 7000; Lobby.ConnectAsServer(lobbyIP, lobbyPort); uLink.Network.InitializeServer(32, 7000); mainMenuManager.ShowMenu(windowPickSelection.GetComponent <Menu>()); pickSelectionScript.CreateLayout(); pickSelectionScript.CreatePickLayout(); cameraMain.SetActive(false); lightsObj.SetActive(false); cameraParticle.clearFlags = CameraClearFlags.SolidColor; }
void uZone_OnConnected(string id) { serverName = uZone.InstanceManager.Server.cmdArgs[1]; maxPlayers = Convert.ToInt32(uZone.InstanceManager.Server.cmdArgs[2]); UnityEngine.Debug.Log("Instance connected."); gameServerPort = uZone.InstanceManager.Server.gameServerPort; uLink.Network.InitializeServer(32, uZone.InstanceManager.Server.gameServerPort); //ServerRegistry.AddServer(gameServerIP, uZone.InstanceManager.Server.gameServerPort, numPlayers, maxPlayers, serverName); Lobby.AddListener(this); Lobby.ConnectAsServer(lobbyIP, lobbyPort); GameObject PickSelectionObj = GameObject.Find("Window_PickSelection"); mainMenuManager.ShowMenu(windowPickSelection.GetComponent <Menu>()); PickSelection pickSelScript = PickSelectionObj.GetComponent <PickSelection>(); pickSelScript.CreateLayout(); pickSelScript.CreatePickLayout(); }