Example #1
0
        public StartState(PlayingState playingState)
        {
            //Needs playingstate to get score
            this.playingState = playingState;

            this.Add(new SpriteGameObject("spr_Background", 0, "", 0, 80));

            info          = new TextGameObject("GameFont", 0, "");
            info.Text     = "Press any key to play";
            info.Position = new Vector2(GameEnvironment.Screen.X / 2 - info.Size.X / 2, GameEnvironment.Screen.Y / 2);
            this.Add(info);
        }
Example #2
0
        protected override void LoadContent()
        {
            base.LoadContent();
            // Create a new SpriteBatch, which can be used to draw textures.
            screen = new Point(1280, 720);
            ApplyResolutionSettings();

            PlayingState playingState = new PlayingState();

            GameStateManager.AddGameState("StartState", new StartState(playingState));
            GameStateManager.SwitchTo("StartState");
            GameStateManager.AddGameState("PlayState", playingState);
        }