Пример #1
0
 public GameState(Game game, GameStateManager manager)
     : base(game)
 {
     this.stateManager = manager;
     this.childComponents = new List<GameComponent>();
     this.tag = this;
 }
Пример #2
0
        public Game1()
        {
            this.InitializeGraphics();

            this.screenRectangle = new Rectangle(0, 0, ScreenWidth, ScreenHeight);
            this.Content.RootDirectory = "Content";

            this.Components.Add(new InputHandler(this));

            this.stateManager = new GameStateManager(this);
            this.Components.Add(this.stateManager);

            this.TitleScreen = new TitleScreen(this, this.stateManager);
            this.StartMenuScreen = new StartMenuScreen(this, this.stateManager);
            this.GamePlayScreen = new GamePlayScreen(this, this.stateManager);
            this.CreditsScreen = new CreditsScreen(this, this.stateManager);

            this.stateManager.ChangeState(this.TitleScreen);
        }
Пример #3
0
 public BaseGameState(Game game, GameStateManager manager)
     : base(game, manager)
 {
     // Creates a reference to the main game.
     this.gameRef = (Game1)game;
 }
Пример #4
0
        private float maxLabelWidth = 0f; // Controls where the arrow appears in the menu.
        #endregion

        public StartMenuScreen(Game game, GameStateManager manager) : base(game, manager)
        {
        }
Пример #5
0
 public CreditsScreen(Game game, GameStateManager manager) : base(game, manager)
 {
 }
Пример #6
0
 public TitleScreen(Game game, GameStateManager manager)
     : base(game, manager)
 {
 }
Пример #7
0
 public GamePlayScreen(Game game, GameStateManager manager) : base(game, manager)
 {
     this.player = new Player(game);
 }