protected override void LoadContent() { base.LoadContent(); SetupLevels(); LoadFromFile(); LoadSettings(); //GameplayScreen s = new GameplayScreen("uluru", 11); MainMenuScreen s = new MainMenuScreen(); s.Initialize(Content); ScreenManager.Get.AddScreen(s); }
private void InitalizeScreens() { gameScreen = new GameScreen(); gameScreen.Initialize(this, playerReference, sadakoReference, inventoryHandler, locationHandler, eventHandler, roomDatabase, tileDatabase); mainMenuScreen = new MainMenuScreen(); mainMenuScreen.Initialize(this, playerReference, sadakoReference, inventoryHandler, locationHandler, eventHandler, roomDatabase, tileDatabase); pauseScreen = new PauseScreen(); pauseScreen.Initialize(this, playerReference, sadakoReference, inventoryHandler, locationHandler, eventHandler, roomDatabase, tileDatabase); currentScreen = mainMenuScreen; }
public void Load(Action onLoadedCallback, object passedParams) { MainMenuLoadParams loadParams = (MainMenuLoadParams)passedParams; onJoinGame = loadParams.OnJoinGame; launchGame = loadParams.OnLaunchGame; Transform gameUiLayer = GameObject.Find("GameUILayer").transform; mainMenuUi = GameObject.Instantiate(Resources.Load <GameObject>("MainMenu"), gameUiLayer); mainMenuScreen = mainMenuUi.GetComponent <MainMenuScreen>(); Service.WebRequests.GetGamesList((response) => { LobbyData lobbyData = JsonUtility.FromJson <LobbyData>(response); mainMenuScreen.Initialize(lobbyData, JoinGame, JoinGameInProgress, CreateGame); onLoadedCallback(); }); }