Exemple #1
0
 public override void Setup()
 {
     base.Setup();
     GameStateManager.Add(new StartPlayGS("StartPlay", GameStateManager));
     GameStateManager.Add(new MainMenuGS(GameStateManager));
     GameStateManager.Add(new GSSettings(GameStateManager));
     GameStateManager.Add(new GSLogin(GameStateManager));
     GameStateManager.Add(new GSGameFinished(GameStateManager));
     GameStateManager.SwitchTo("GSMainMenu");
 }
Exemple #2
0
    protected override void LoadContent()
    {
        base.LoadContent();

        Screen = new Point(1440, 825);
        this.SetFullScreen(true);

        GameStateManager.Add("TitleMenu", new TitleMenuState());
        GameStateManager.Add("PlayingState", new PlayingState(Content));
        GameStateManager.Add("LevelMenu", new LevelMenuState());
        GameStateManager.Add("GameOverState", new GameOverState());
        GameStateManager.Add("LevelFinishedState", new LevelFinishedState());
        GameStateManager.SwitchTo("TitleMenu");

        LoadManager.PlayMusic("Sounds/snd_music");
    }
Exemple #3
0
        /// <summary>
        /// Allows the game to perform any initialization it needs to before starting to run.
        /// This is where it can query for any required services and load any non-graphic
        /// related content.  Calling base.Initialize will enumerate through any components
        /// and initialize them as well.
        /// </summary>
        protected override void Initialize()
        {
            // TODO: Add your initialization logic here
            gameManager.Initialize();

            pressStartState.Initialize();
            startState.Initialize();
            mainMenuState.Initialize();
            storyState.Initialize();
            levelState.Initialize();
            shopState.Initialize();
            gameOverState.Initialize();
            creditsState.Initialize();

            startState.NextState = (int)MageDefenderStates.PressStart;

            gameManager.Add(startState);

            base.Initialize();
        }