Exemplo n.º 1
0
        protected override void Update(GameTime gameTime)
        {
            ///Move Handling
            if (Keyboard.GetState().IsKeyDown(Keys.NumPad6))
            {
                _assetHandler.Move(_heroShip, Direction.Right);
            }
            if (Keyboard.GetState().IsKeyDown(Keys.NumPad4))
            {
                _assetHandler.Move(_heroShip, Direction.Left);
            }
            if (Keyboard.GetState().IsKeyDown(Keys.NumPad8))
            {
                _assetHandler.Move(_heroShip, Direction.Up);
            }
            if (Keyboard.GetState().IsKeyDown(Keys.NumPad2))
            {
                _assetHandler.Move(_heroShip, Direction.Down);
            }

            ///Rotate Handling
            if (Keyboard.GetState().IsKeyDown(Keys.NumPad9))
            {
                _assetHandler.Rotate(_heroShip, Sens.Right);
            }
            if (Keyboard.GetState().IsKeyDown(Keys.NumPad7))
            {
                _assetHandler.Rotate(_heroShip, Sens.Left);
            }


            base.Update(gameTime);
        }