void Game_State_Handler(Window_Return_Info window_Return_Info)
 {
     if (window_Return_Info.windowTransition)
     {
         game_Window_State = window_Return_Info.newState;
     }
 }
示例#2
0
 public void Game_State_Handler(Window_Return_Info windowReturnInfo)
 {
     if (windowReturnInfo.windowTransition == true)
     {
         gameWindowState = windowReturnInfo.newState;
     }
 }
示例#3
0
        public Window_Return_Info Update(GameTime gameTime, Tools.KeyPress keyPress, Window_Return_Info window_Return_Info)
        {
            window_Return_Info.windowTransition = false;
            window_Return_Info.newState = Game_Window_State.Game;
            Tools.Camera.offset = Vector2.Zero;

            window_Return_Info.windowTransition = true;

            return window_Return_Info;
        }
示例#4
0
        public Window_Return_Info Update(GameTime gameTime, Tools.KeyPress keyPress, Window_Return_Info window_Return_Info)
        {
            window_Return_Info.windowTransition = false;
            window_Return_Info.newState = Game_Window_State.Game;

            level = level.Update(gameTime, keyPress, level);
            if (level.shouldPlayerShift() == true)
            {
                player.Position = level.getPlayerStartPosition();
                Tools.Camera.offset.X = player.Position.X - (GraphicsDevice.Viewport.Width / 2);
            }
            player = player.Update(gameTime, keyPress, player);

            for (int i = 0; i >= 0; i++)
            {
                if (Entities[i].IsUsed() != true)
                {
                    break;
                }
                else
                {
                    Entities[i].Update(gameTime, keyPress, player, level);
                }
            }

            CameraPosition(level, player);

            return window_Return_Info;
        }
示例#5
0
        protected override void Update(GameTime gameTime)
        {
            KeyPress = KeyPressManager.HandleInput();
            if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed || Keyboard.GetState().IsKeyDown(Keys.Escape))
                Exit();

            windowReturnInfo = StateUpdate(gameTime);

            base.Update(gameTime);
        }
示例#6
0
        protected Window_Return_Info StateUpdate(GameTime gameTime)
        {
            switch (gameWindowState)
            {
                case Game_Window_State.Launch:
                    windowReturnInfo = launchManager.Update(gameTime, KeyPress, windowReturnInfo);
                    gameDrawState = Game_Draw_State.Launch;
                    break;

                case Game_Window_State.Game:
                    windowReturnInfo = gameManager.Update(gameTime, KeyPress, windowReturnInfo);
                    gameDrawState = Game_Draw_State.Game;
                    break;
            }
            return windowReturnInfo;
        }