C# 클래스 GameEngine.Extensions.KeyboardExtensions

파일 보기 프로젝트 열기: MichaelAquilina/Some-2D-RPG

공개 메소드들

메소드 설명
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