public void InitializePool() { if (CC == null) { CC = UnityEngine.Object.FindObjectOfType <Lobby.LobbyManager>(); } if (ClothFactoryReference == null) { ClothFactoryReference = UnityEngine.Object.FindObjectOfType <ClothFactory>(); } if (CC != null) { if (!CC.characterCustomization.playerCustomisationData.ContainsKey(Type)) { CC.characterCustomization.playerCustomisationData[Type] = new Dictionary <string, PlayerCustomisationData>(); } CC.characterCustomization.playerCustomisationData[Type][Name] = this; } if (ClothFactoryReference != null) { if (!ClothFactoryReference.playerCustomisationData.ContainsKey(Type)) { ClothFactoryReference.playerCustomisationData[Type] = new Dictionary <string, PlayerCustomisationData>(); } ClothFactoryReference.playerCustomisationData[Type][Name] = this; } }
private void Start() { Lobby.LobbyManager mgr = GameObject.FindObjectOfType <Lobby.LobbyManager>(); client = mgr.client; if (isServer) { NetworkServer.RegisterHandler(StoryMsg, ServerRcvAskStoryCard); } if (isClient) { client.RegisterHandler(StoryMsg, ClientRcvStoryCard); } }
public void Populate(MatchInfoSnapshot 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; _lobbyHooks = GetComponent <Lobby.LobbyHook>(); currentPanel = mainMenuPanel; backButton.gameObject.SetActive(false); GetComponent <Canvas>().enabled = true; DontDestroyOnLoad(gameObject); SetServerInfo("Offline", "None"); }
private void Start() { Lobby.LobbyManager mgr = GameObject.FindObjectOfType <Lobby.LobbyManager>(); client = mgr.client; NetworkServer.RegisterHandler(EndTurnMsg, OnServerRcvEndTurn); }