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);
        }
Exemple #2
0
        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;
        }
Exemple #3
0
    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();
        });
    }