public GameState(Game game, GameStateManager manager) : base(game) { this.stateManager = manager; this.childComponents = new List<GameComponent>(); this.tag = this; }
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); }
public BaseGameState(Game game, GameStateManager manager) : base(game, manager) { // Creates a reference to the main game. this.gameRef = (Game1)game; }
private float maxLabelWidth = 0f; // Controls where the arrow appears in the menu. #endregion public StartMenuScreen(Game game, GameStateManager manager) : base(game, manager) { }
public CreditsScreen(Game game, GameStateManager manager) : base(game, manager) { }
public TitleScreen(Game game, GameStateManager manager) : base(game, manager) { }
public GamePlayScreen(Game game, GameStateManager manager) : base(game, manager) { this.player = new Player(game); }