Ejemplo n.º 1
0
 public GameplayState(Game game, GameStateManager manager, EntityProperties properties)
     : base(game, manager)
 {
     loadedGame = true;
     loadedProps = properties == null ? new EntityProperties() : properties;
     hud = new HUD(this);
 }
Ejemplo n.º 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();
        }
Ejemplo n.º 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;
 }
Ejemplo n.º 4
0
 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);
 }
Ejemplo n.º 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();
        }
Ejemplo n.º 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();
        }
Ejemplo n.º 7
0
        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();
        }
Ejemplo n.º 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();
        }
Ejemplo n.º 9
0
 public MainMenuState(Game game, GameStateManager manager)
     : base(game, manager)
 {
 }
Ejemplo n.º 10
0
 public GameplayState_Proto(Game game, GameStateManager manager)
     : base(game, manager)
 {
 }
Ejemplo n.º 11
0
 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;
 }
Ejemplo n.º 14
0
 public BaseGameState(Game game, GameStateManager manager)
     : base(game, manager)
 {
     gameRef = (MainGame)game;
     playerIndexInControl = PlayerIndex.One;
 }
Ejemplo n.º 15
0
 public NewLevelScreen(Game game, GameStateManager manager, string playerName)
     : base(game, manager)
 {
     this.playerName = playerName;
 }
Ejemplo n.º 16
0
 public LoadingState(Game game, GameStateManager manager, GameState nextState)
     : base(game, manager)
 {
     this.nextState = nextState;
 }
Ejemplo n.º 17
0
 public IntroState(Game game, GameStateManager gamestate)
     : base(game, gamestate)
 {
 }
 public GameoverState(Game game, GameStateManager manager)
     : base(game, manager)
 {
 }
Ejemplo n.º 19
0
 public GameplayState(Game game, GameStateManager manager)
     : base(game, manager)
 {
     hud = new HUD(this);
 }
Ejemplo n.º 20
0
 public NewGameScreen(Game game, GameStateManager manager)
     : base(game, manager)
 {
 }
Ejemplo n.º 21
0
 public TitleState(Game game, GameStateManager manager)
     : base(game, manager)
 {
 }
 public BaseGameState(Game game, GameStateManager manager)
     : base(game, manager)
 {
     gameRef = (Game1)game;
 }