void JoinMatch(NetworkID networkID, LobbyManager lobbyManager, MatchDesc match) { lobbyManager.DisplayIsConnecting (); lobbyManager.matchMaker.JoinMatch (networkID, "", lobbyManager.OnMatchJoined); lobbyManager.currentMatchValue = Int32.Parse(match.name.Split(' ')[match.name.Split(' ').Length-1]); lobbyManager.backDelegate = lobbyManager.QuitLobbyToMenu; lobbyManager.isMatchmaking = true; }
void JoinMatch(NetworkID networkID, LobbyManager lobbyManager) { lobbyManager.matchMaker.JoinMatch(networkID, "", lobbyManager.OnMatchJoined); lobbyManager.backDelegate = lobbyManager.StopClientClbk; lobbyManager._isMatchmaking = true; lobbyManager.DisplayIsConnecting(); }
// Use this for initialization void Start () { NLH = GameObject.Find("LobbyManager").GetComponent<NetworkLobbyHook>(); LM = GameObject.Find("LobbyManager").GetComponent<UnityStandardAssets.Network.LobbyManager>(); checkingPlayers = LM.PlayersOnline.Count; //Tells the player what its name is gameObject.name = playerName; //Renderar the colour and the texture player had choosen ealier Renderer[] CRends = GetComponentsInChildren<Renderer>(); if(checkingTexture == 1) { playertexture = selectableTextures[0]; } if (checkingTexture == 2) { playertexture = selectableTextures[1]; } if (checkingTexture == 3) { playertexture = selectableTextures[2]; } Color headcolor = GameObject.Find(this.gameObject.name + "/Body/regular_dude_body").GetComponent<Renderer>().material.color; foreach (Renderer r in CRends) { r.material.mainTexture = playertexture; r.material.color = color; } GameObject.Find(this.gameObject.name + "/Body/regular_dude_head").GetComponent<Renderer>().material.color = headcolor; //Two Materials /* GameObject.Find(this.gameObject.name + "/Body/regular_dude_right_hand").GetComponent<Renderer>().material.color = headcolor; GameObject.Find(this.gameObject.name + "/Body/regular_dude_right_hand").GetComponent<Renderer>().material.color = headcolor;*/ }
public void Populate(MatchDesc match, LobbyManager lobbyManager) { serverInfoText.text = match.name; slotInfo.text = match.currentSize.ToString () + "/" + match.maxSize.ToString (); NetworkID networkID = match.networkId; joinButton.onClick.RemoveAllListeners (); joinButton.onClick.AddListener (() => { JoinMatch (networkID, lobbyManager, match); }); }
void Start() { s_Singleton = this; _lobbyHooks = GetComponent<UnityStandardAssets.Network.LobbyHook>(); currentPanel = mainMenuPanel; backButton.gameObject.SetActive(false); GetComponent<Canvas>().enabled = true; DontDestroyOnLoad(gameObject); SetServerInfo("Offline", "None"); }
void Start() { s_Singleton = this; _lobbyHooks = GetComponent <UnityStandardAssets.Network.LobbyHook>(); currentPanel = mainMenuPanel; backButton.gameObject.SetActive(false); GetComponent <Canvas>().enabled = true; DontDestroyOnLoad(gameObject); SetServerInfo("Offline", "None"); }
public void Populate(MatchDesc match, LobbyManager lobbyManager, Color c) { serverInfoText.text = match.name; slotInfo.text = match.currentSize.ToString() + "/" + match.maxSize.ToString();; NetworkID networkID = match.networkId; joinButton.onClick.RemoveAllListeners(); joinButton.onClick.AddListener(() => { JoinMatch(networkID, lobbyManager); }); GetComponent <Image>().color = c; }
void Start() { s_Singleton = this; connectionConfig.IsAcksLong = true; connectionConfig.MaxSentMessageQueueSize = 512; _lobbyHooks = GetComponent<UnityStandardAssets.Network.LobbyHook>(); currentPanel = mainMenuPanel; backButton.gameObject.SetActive(false); GetComponent<Canvas>().enabled = true; DontDestroyOnLoad(gameObject); SetServerInfo("Offline", "None"); }
// Use this for initialization void Start () { LobbyScenes = GameObject.Find("LobbyManager").GetComponent< UnityStandardAssets.Network.LobbyManager>(); OptionSelected = GameObject.Find("OptionSelection").GetComponent<Text>(); MapFolder = GameObject.Find("MapImage").GetComponent<Image>(); }