public GameState(Game game, GameStateManeger _stateManeger) : base(game) { StateManeger = _stateManeger; childComponents = new List<GameComponent>(); tag = this; this.game = game; Song = game.Content.Load<Song>("Music/Vogel im Kafig"); }
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)); stateManeger = new GameStateManeger(this); Components.Add(stateManeger); StartMenuScreen = new GameScreens.StartMenuScreen(this, stateManeger); stateManeger.ChangeState(StartMenuScreen); }