public GameplayState(Game game, GameStateManager manager, EntityProperties properties)
     : base(game, manager)
 {
     loadedGame = true;
     loadedProps = properties == null ? new EntityProperties() : properties;
     hud = new HUD(this);
 }
示例#2
0
        protected override void Initialize()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);
            gameContent = Content;

            Components.Add(new InputHandler(this));

            SheetManager.Initialize(this);

            manager = new GameStateManager(this);
            Components.Add(manager);
            manager.ChangeState(new MainMenuState(this, manager));

            graphics.PreferredBackBufferWidth = GAME_WIDTH;
            graphics.PreferredBackBufferHeight = GAME_HEIGHT;
            graphics.ApplyChanges();
            IsMouseVisible = true;

            Config.Initialize(this);

               // NoiseGenerator.Initialize(this);

            base.Initialize();
        }
示例#3
0
 /// <summary>
 /// Creates a new game state
 /// </summary>
 /// <param name="game">Main XNA game</param>
 /// <param name="manager">The manager in charge of this state</param>
 public GameState(Game game, GameStateManager manager)
     : base(game)
 {
     StateManager = manager;
     childComponents = new List<GameComponent>();
     tag = this;
 }
 public GamePlayScreen(Game game, GameStateManager manager, SaveData data)
     : base(game, manager)
 {
     ssm = new SpriteSheetManager(GameRef.GraphicsDevice, GameRef.Content);
     tsm = new TileSheetManager(GameRef.GraphicsDevice, GameRef.Content);
     lm = new LevelManager(GameRef.Content, data);
 }
示例#5
0
        protected override void Initialize()
        {
            stateManager = new GameStateManager(this);

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

            stateManager.ChangeState(new GameplayState(this, stateManager));

            base.Initialize();
        }
示例#6
0
        protected override void Initialize()
        {
            projectData = new ProjectData(this);

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

            Components.Add(new InputHandler(this));

            var gamePlayState = new GameplayState_Proto(this, stateManager);
            stateManager.PushState(gamePlayState);

            base.Initialize();
        }
        protected override void Initialize()
        {
            content = Content;

            Components.Add(new InputHandler(this));

            sfxManager = new SoundManager(this);
            Components.Add(sfxManager);

            manager = new GameStateManager(this);
            Components.Add(manager);
            manager.ChangeState(new TitleState(this, manager));

            base.Initialize();
        }
示例#8
0
        protected override void Initialize()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);

            projectData = new ProjectData(Content, graphics);
            Components.Add(new InputHandler(this));

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

            StartMenuScreen = new GameScreens.StartMenuScreen(this, stateManager);

            // Make the state manager jump to
            stateManager.ChangeState(StartMenuScreen);

            base.Initialize();
        }
示例#9
0
 public MainMenuState(Game game, GameStateManager manager)
     : base(game, manager)
 {
 }
 public GameplayState_Proto(Game game, GameStateManager manager)
     : base(game, manager)
 {
 }
 public StartMenuScreen(Game game, GameStateManager manager)
     : base(game, manager)
 {
 }
 public DevGameplayState(Game game, GameStateManager manager)
     : base(game, manager, false)
 {
 }
 public GameplayState(Game game, GameStateManager manager, bool singlePlayer)
     : base(game, manager)
 {
     this.singlePlayer = singlePlayer;
 }
 public BaseGameState(Game game, GameStateManager manager)
     : base(game, manager)
 {
     gameRef = (MainGame)game;
     playerIndexInControl = PlayerIndex.One;
 }
示例#15
0
 public NewLevelScreen(Game game, GameStateManager manager, string playerName)
     : base(game, manager)
 {
     this.playerName = playerName;
 }
 public LoadingState(Game game, GameStateManager manager, GameState nextState)
     : base(game, manager)
 {
     this.nextState = nextState;
 }
 public IntroState(Game game, GameStateManager gamestate)
     : base(game, gamestate)
 {
 }
 public GameoverState(Game game, GameStateManager manager)
     : base(game, manager)
 {
 }
 public GameplayState(Game game, GameStateManager manager)
     : base(game, manager)
 {
     hud = new HUD(this);
 }
示例#20
0
 public NewGameScreen(Game game, GameStateManager manager)
     : base(game, manager)
 {
 }
 public TitleState(Game game, GameStateManager manager)
     : base(game, manager)
 {
 }
 public BaseGameState(Game game, GameStateManager manager)
     : base(game, manager)
 {
     gameRef = (Game1)game;
 }