ProcessKeyboard() public method

public ProcessKeyboard ( SadConsole info ) : bool
info SadConsole
return bool
Example #1
0
        private bool ProcessKeyboardRunning(SadConsole.Input.Keyboard info)
        {
            bool processedKeyboard = false;

            if (player.ProcessKeyboard(info))
            {
                processedKeyboard = true;
                if (info.IsKeyDown(Keys.Up))
                {
                    upKeyAnimation.Run();
                }
                else if (info.IsKeyDown(Keys.Down))
                {
                    downKeyAnimation.Run();
                }
                else if (info.IsKeyDown(Keys.Left))
                {
                    leftKeyAnimation.Run();
                }
                else if (info.IsKeyDown(Keys.Right))
                {
                    rightKeyAnimation.Run();
                }
            }

            return(processedKeyboard);
        }