示例#1
0
        public void HandleInput(GameTime gameTime)
        {
            if (Re.State == RhythmEngine.RhythmEngineState.Playing)
            {
                LeftController.Update(gameTime);
                RightController.Update(gameTime);
            }
            KeyboardState Current = Host.KeyboardInput.Current;

            if (Host.Debugging)
            {
                // Rhythm engine
                if (Host.KeyboardInput.IsTap(Keys.OemOpenBrackets))
                {
                    Re.Stop();
                }
                if (Host.KeyboardInput.IsTap(Keys.OemCloseBrackets))
                {
                    Re.Play();
                }
                if (Host.KeyboardInput.IsTap(Keys.OemPipe))
                {
                    Re.Pause();
                }
                if (Current.IsKeyDown(Keys.OemPlus))
                {
                    Re.Shift(playerShift);
                }
                if (Current.IsKeyDown(Keys.OemMinus))
                {
                    Re.Shift(-playerShift);
                }
            }
        }