コード例 #1
0
        protected override void Update(GameTime gameTime)
        {
            KeyboardInput.checkKey();
            if (nextState != null)
            {
                currentState = nextState;
                nextState    = null;
            }

            if (!debugConsole.isFocused)
            {
                currentState.Update(gameTime);
            }

            if (KeyboardInput.checkKeyReleased(Keys.RightControl))
            {
                debugConsole.isFocused = !debugConsole.isFocused;
            }
        }
コード例 #2
0
 public override void Update()
 {
     if (KeyboardInput.checkKeyReleased(Keys.Z))
     {
         position.Y -= 16;
     }
     if (KeyboardInput.checkKeyReleased(Keys.S))
     {
         position.Y += 16;
     }
     if (KeyboardInput.checkKeyReleased(Keys.Q))
     {
         position.X -= 16;
     }
     if (KeyboardInput.checkKeyReleased(Keys.D))
     {
         position.X += 16;
     }
 }