Beispiel #1
0
 public GameState(Game game, GameStateManager manager)
     : base(game)
 {
     StateManager = manager;
     childComponents = new List<GameComponent>();
     tag = this;
 }
Beispiel #2
0
        public Game1()
        {
            graphics = new GraphicsDeviceManager(this);
            graphics.PreferredBackBufferWidth = screenWidth;
            graphics.PreferredBackBufferHeight = screenHeight;

            ScreenRectangle = new Rectangle(0, 0, screenWidth, screenHeight);

            Content.RootDirectory = "Content";

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

            TitleScreen = new TitleScreen(this, stateManager);
            stateManager.ChangeState(TitleScreen);
        }
Beispiel #3
0
 public BaseGameState(Game game, GameStateManager manager)
     : base(game, manager)
 {
     GameRef = (Game1)game;
 }
Beispiel #4
0
 public TitleScreen(Game game, GameStateManager manager)
     : base(game, manager)
 {
 }