示例#1
0
        public override void HandleInput(InputHelper input, GameTime gameTime)
        {
            if (input.IsNewButtonPress(Buttons.A) || input.IsNewMouseButtonPress(MouseButtons.RightButton) || input.IsNewKeyPress(Keys.Space))
            {
                _walker.Reverse();
            }

            base.HandleInput(input, gameTime);
        }
示例#2
0
 protected override void OnUpdate(float delta)
 {
     if (_walker == null)
     {
         return;
     }
     if (!_walker.Moving)
     {
         _walker.Reverse();
     }
 }