public void Start() { playerDatabaseScript = GameObject.Find("GameManager_mn").GetComponent <PlayerDatabase>(); GameObject PickSelectionObj = GameObject.Find("Window_PickSelection_mn"); pickSelectionScript = PickSelectionObj.GetComponent <PickSelection>(); uZone.InstanceManager.Server.AddListener(this.gameObject); //StartServer(); }
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(); }
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(); }
// Use this for initialization void Start() { characters = new Stack <Char_Pick>(); playerPickObj = GameObject.Find("Window_PickSelection_mn"); playerPickScript = playerPickObj.GetComponent <PickSelection>(); }
// Use this for initialization void Start() { playerPickObj = GameObject.Find("Window_PickSelection_mn"); playerPickScript = playerPickObj.GetComponent <PickSelection>(); }