C# Класс GameEngine.Extensions.KeyboardExtensions

Показать файл Открыть проект

Открытые методы

Метод Описание
GetKeyDownState ( KeyboardState keyboardState, Keys key, object lockObject, bool lockKey = true ) : bool

Returns a boolean value specifying whether the key specified in the parameter is currently down or not. If the key is down then the method will *lock* the key with the specified lockObject until it has been released and this method is called again. This method is very useful for performing 'one-time' actions for an Entity or Script that should not be repeated while the key is kept pressed by the user.

Приватные методы

Метод Описание
AddToLockedKeys ( object lockObject, Keys value ) : void
RemoveFromLockedKeys ( object lockObject, Keys value ) : bool

Описание методов

GetKeyDownState() публичный статический Метод

Returns a boolean value specifying whether the key specified in the parameter is currently down or not. If the key is down then the method will *lock* the key with the specified lockObject until it has been released and this method is called again. This method is very useful for performing 'one-time' actions for an Entity or Script that should not be repeated while the key is kept pressed by the user.
public static GetKeyDownState ( KeyboardState keyboardState, Keys key, object lockObject, bool lockKey = true ) : bool
keyboardState Microsoft.Xna.Framework.Input.KeyboardState The current KeyboardState retrieved by the calling method.
key Keys Key to check and lock if found to be down.
lockObject object The object with which to associate the lock. All other objects will still retrieve a true in the next method call.
lockKey bool Boolean value specifying if the method should use the locking mechanism or not. True by default.
Результат bool