메소드 | 설명 | |
---|---|---|
changeKeyControl ( KeyInputType inputType, Keys key ) : void |
Change the key input needed to trigger a given game function; used for customizing key controls
|
|
getKeyControl ( KeyInputType inputType ) : Keys |
Returns the current Key mapped to this KeyInputType
|
|
getKeyControls ( ) : Keys[] |
Used for saving purposes only
|
|
getNewKeyPressed ( ) : Keys |
Returns one key that has just been pressed (assuming it's the only key pressed)
|
|
handleCharacterMovement ( |
Ts Character movement in 8 directions; call this method in the Game's update cycle (AFTER calling KeyboardManager.update())
|
|
handleInGameMenu ( ) : void | ||
handleInteractions ( |
Handles the Hero talking with Characters. Will be expanded later to "interact" with scenery as well.
|
|
handlePickpocketing ( |
Handles the Hero's pickpocketing ability; call this method in the Game's update cycle (AFTER calling KeyboardManager.update())
|
|
handleShooting ( |
Handles Hero's "weapon" ability; call this method in the Game's update cycle (AFTER calling KeyboardManager.update())
|
|
handleSimpleScreen ( |
||
isKeyDown ( Keys key ) : bool |
Checks if the given key is currently down (pressed)
|
|
isKeyPressed ( Keys key ) : bool |
Checks if the given key has just been pressed (i.e. it is down now and was not pressed in the previous update)
|
|
isKeyUnpressed ( Keys key ) : bool |
Checks if the given key has just been released (i.e. it is up now and was pressed in the previous update)
|
|
isKeyUp ( Keys key ) : bool |
Checks if the given key is currently up (not pressed)
|
|
isNewKeyPressed ( ) : bool |
Checks if any new key has just been pressed (and was not down previously)
|
|
keyControlExists ( Keys key, KeyInputType exclude ) : bool |
A check for whether the given key is already registered with a certain type of input. Called when customizing key controls
|
|
loadDefaultKeys ( ) : void |
Used for loading the default key controls when starting a game (or resetting controls)
|
|
loadKeyControls ( Keys loadableKeys ) : void |
Used for loading in custom key controls when restoring a saved game
|
|
update ( ) : void |
Updates the keyboard input; call this method in the Game's update cycle
|
메소드 | 설명 | |
---|---|---|
nullCheck ( ) : void |
public static changeKeyControl ( KeyInputType inputType, Keys key ) : void | ||
inputType | KeyInputType | The game function |
key | Keys | The new key to press |
리턴 | void |
public static getKeyControl ( KeyInputType inputType ) : Keys | ||
inputType | KeyInputType | |
리턴 | Keys |
public static handleCharacterMovement ( |
||
character | The character to control (presumably main character) | |
elapsed | float | The time that elapsed since the last update |
리턴 | void |
public static handleInteractions ( |
||
hero | The main character | |
targets | List |
List of interactables in the scene |
리턴 | void |
public static handlePickpocketing ( |
||
hero | The main character | |
targets | List |
List of characters in the scene; one that is in range is chosen randomly |
리턴 | void |
public static handleSimpleScreen ( |
||
sender | ||
리턴 | void |
public static isKeyDown ( Keys key ) : bool | ||
key | Keys | The key to check for |
리턴 | bool |
public static isKeyPressed ( Keys key ) : bool | ||
key | Keys | The key to check for |
리턴 | bool |
public static isKeyUnpressed ( Keys key ) : bool | ||
key | Keys | The key to check for |
리턴 | bool |
public static isKeyUp ( Keys key ) : bool | ||
key | Keys | The key to check for |
리턴 | bool |
public static keyControlExists ( Keys key, KeyInputType exclude ) : bool | ||
key | Keys | The possible key to shift the input type to |
exclude | KeyInputType | Input type to exclude (i.e. the input being considered) |
리턴 | bool |
public static loadKeyControls ( Keys loadableKeys ) : void | ||
loadableKeys | Keys | A Keys[] representation of the key controls |
리턴 | void |