private void Awake() { if (mim == null) { mim = this; } else if (mim != this) { Destroy(this); } }
public void StartGame() { Debug.Log("Starting game (2)!"); //if (popupCount > 0) Close_MobileInfos_Popup(); lobbyMenu.gameObject.SetActive(false); gameMenu.gameObject.SetActive(true); int PID = FirebaseLobbyManager.flm.playerID + 1; string lobby_name = FirebaseLobbyManager.flm.is_in_lobby; if (lobby_name.StartsWith("lobby_")) { lobby_name = lobby_name.Substring("lobby_".Length); } Debug.Log("Initializing game with parameters: ID = " + PID + "; PC = " + FirebaseLobbyManager.flm.player_count + "; LN = " + lobby_name); byte weather = FirebaseLobbyManager.flm.weatherData; int tileset = MobileInfosManager.WeatherToTileSet(weather); MainGameManager.mgm.InitGame(PID, FirebaseLobbyManager.flm.player_count, lobby_name, tileset); }