Méthode | Description | |
---|---|---|
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
|
Méthode | Description | |
---|---|---|
nullCheck ( ) : void |
public static changeKeyControl ( KeyInputType inputType, Keys key ) : void | ||
inputType | KeyInputType | The game function |
key | Keys | The new key to press |
Résultat | void |
public static getKeyControl ( KeyInputType inputType ) : Keys | ||
inputType | KeyInputType | |
Résultat | Keys |
public static handleCharacterMovement ( |
||
character | The character to control (presumably main character) | |
elapsed | float | The time that elapsed since the last update |
Résultat | void |
public static handleInteractions ( |
||
hero | The main character | |
targets | List |
List of interactables in the scene |
Résultat | void |
public static handlePickpocketing ( |
||
hero | The main character | |
targets | List |
List of characters in the scene; one that is in range is chosen randomly |
Résultat | void |
public static handleShooting ( |
||
hero | ||
Résultat | void |
public static handleSimpleScreen ( |
||
sender | ||
Résultat | void |
public static isKeyDown ( Keys key ) : bool | ||
key | Keys | The key to check for |
Résultat | bool |
public static isKeyPressed ( Keys key ) : bool | ||
key | Keys | The key to check for |
Résultat | bool |
public static isKeyUnpressed ( Keys key ) : bool | ||
key | Keys | The key to check for |
Résultat | bool |
public static isKeyUp ( Keys key ) : bool | ||
key | Keys | The key to check for |
Résultat | 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) |
Résultat | bool |
public static loadKeyControls ( Keys loadableKeys ) : void | ||
loadableKeys | Keys | A Keys[] representation of the key controls |
Résultat | void |