input.isKeyPressed
isKeyPressed(action: string) → {boolean}
return the key press status of the specified action
if (me.input.isKeyPressed('left')) {
//do something
}
else if (me.input.isKeyPressed('right')) {
//do something else...
}
Name | Type | Description |
---|---|---|
action | string |
user defined corresponding action |
Type | Description |
---|---|
boolean |
true if pressed |