void InputManager_OnKeyPressed(Microsoft.Xna.Framework.Input.Keys key, GameTime gameTime) { lock (lockObj) { CurrentScene?.KeyPressed(key, gameTime); } }
private void CheckForKeyboardEvents() { var key = TCODConsole.checkForKeypress( (int)TCODKeyStatus.KeyPressed | (int)TCODKeyStatus.KeyReleased); if (key.KeyCode != TCODKeyCode.NoKey) { if (key.Pressed) { CurrentScene.KeyPressed(key); } else { CurrentScene.KeyReleased(key); } } }