void Start() { s_singleton = this; titel = Application.loadedLevelName; var text = File.ReadAllText(Application.dataPath + "/connect.json"); var textAsset = Resources.Load("connect") as TextAsset; JsonNode json = JsonNode.Parse(text); var is_host = json["Host"].Get <bool>(); if (is_host) { MyNetworkLobbyManager.s_singleton.StartHost(); } else { string ip = json["IP"].Get <string>(); MyNetworkLobbyManager.s_singleton.networkAddress = ip; MyNetworkLobbyManager.s_singleton.is_1p_ = false; MyNetworkLobbyManager.s_singleton.StartClient(); } }
void Awake() { DontDestroyOnLoad(this); if (instance != null) { Debug.LogError("More than one GameManager in scene."); } else { instance = this; } networkLobbyManager = GameObject.FindGameObjectWithTag("NetworkManager").GetComponent <MyNetworkLobbyManager>(); }
//minimap void Start() { statusEffectHandler = new StatusEffectHandler(gameObject); if (!isLocalPlayer) { GetComponent <KartBehaviour>().enabled = false; transform.FindChild("Main Camera").gameObject.SetActive(false); GetComponent <KartInput>().enabled = false; } else { localPlayer = gameObject; } networkManager = GameObject.Find("Lobby").GetComponent <MyNetworkLobbyManager>(); }
//minimap void Start() { statusEffectHandler= new StatusEffectHandler(gameObject); if (!isLocalPlayer) { GetComponent<KartBehaviour>().enabled = false; transform.FindChild("Main Camera").gameObject.SetActive(false); GetComponent<KartInput>().enabled = false; } else { localPlayer = gameObject; } networkManager = GameObject.Find("Lobby").GetComponent<MyNetworkLobbyManager>(); }
void OnGUI() { lobbyManager = NetworkManager.singleton as MyNetworkLobbyManager; if (lobbyManager) { if (SceneManager.GetActiveScene().name != lobbyManager.lobbyScene) { if (showLobbyGUI) { if (!lobbyManager.showLobbyGUI) { GameObject.Find("Lobby").GetComponent <Lobby>().DisableUI(); showLobbyGUI = false; } } return; } } }
void OnGUI() { lobbyManager = NetworkManager.singleton as MyNetworkLobbyManager; if (lobbyManager) { if (SceneManager.GetActiveScene().name != lobbyManager.lobbyScene) { if (showLobbyGUI) { if (!lobbyManager.showLobbyGUI) { GameObject.Find("Lobby").GetComponent<Lobby>().DisableUI(); showLobbyGUI = false; } } return; } } }
// Use this for initialization void Start () { lobbyManager = GameObject.Find("Lobby").GetComponent<MyNetworkLobbyManager>(); MyNetworkLobbyManager.networkLobbyManagerInstance = lobbyManager; lobbyManager.showLobbyGUI = true; lobbyPlayerList = GameObject.Find("LobbyPlayerList"); menu = transform.FindChild("LobbyUI").GetComponent<LobbyMenu>(); startButton = GameObject.Find("StartButton"); lobbyManager.showLobbyUI = true; if (ServerInfo.hosting) { lobbyManager.StartHost(); } else { lobbyManager.networkAddress = ServerInfo.ip; client = lobbyManager.StartClient(); } }
// Use this for initialization void Start() { lobbyManager = GameObject.Find("Lobby").GetComponent <MyNetworkLobbyManager>(); MyNetworkLobbyManager.networkLobbyManagerInstance = lobbyManager; lobbyManager.showLobbyGUI = true; lobbyPlayerList = GameObject.Find("LobbyPlayerList"); menu = transform.FindChild("LobbyUI").GetComponent <LobbyMenu>(); startButton = GameObject.Find("StartButton"); lobbyManager.showLobbyUI = true; if (ServerInfo.hosting) { lobbyManager.StartHost(); } else { lobbyManager.networkAddress = ServerInfo.ip; client = lobbyManager.StartClient(); } }
void Start() { titel = Application.loadedLevelName; s_singleton = this; var text = File.ReadAllText(Application.dataPath + "/connect.json"); var textAsset = Resources.Load("connect") as TextAsset; JsonNode json = JsonNode.Parse(text); var is_host = json["Host"].Get<bool>(); if (is_host) { MyNetworkLobbyManager.s_singleton.StartHost(); } else { string ip = json["IP"].Get<string>(); MyNetworkLobbyManager.singleton.networkAddress = ip; MyNetworkLobbyManager.s_singleton.is_1p_ = false; MyNetworkLobbyManager.s_singleton.StartClient(); } }
void Start() { lobbyManager = GameObject.Find("Lobby").GetComponent<MyNetworkLobbyManager>(); canvas = GameObject.Find("Lobby Settings"); ChangePlayerCount(8); }
void Start() { lobbyManager = GameObject.Find("Lobby").GetComponent <MyNetworkLobbyManager>(); canvas = GameObject.Find("Lobby Settings"); ChangePlayerCount(8); }
void Start() { my_network_lobby_manager_ = GetComponent<MyNetworkLobbyManager>(); }
void Start() { // networkLobbyManager is not destroyed on load, so we have to find it // in case this title screen is destroyed. networkLobbyManager = GameObject.Find("NetworkManager").GetComponent<MyNetworkLobbyManager>(); switchState(State.TITLE); }
void Awake() { networkLobbyManager = GetComponent <MyNetworkLobbyManager>(); ipPlaceholder.GetComponent <Text>().text = placehold; }