-
Notifications
You must be signed in to change notification settings - Fork 0
Character functions
Ondolin edited this page Mar 10, 2021
·
3 revisions
There are two types of character functions.
- functions on specific characters
- global functions
There is a hole article on those functions here.
Those functions are located in torchly.characters
.
Function name | return value | parameters | description |
---|---|---|---|
add |
void | character: Character |
add a new Character |
removeByID |
void | id: string |
find character and removes it |
getByID |
Character OR undefind |
id: string |
returns the character with the the provided id or undefined if the is none |
forceUpdateCharacters |
void | - | query characters from backend, even if there is no subscription trigger |
moveRelative |
void | id: string, point: {x: number, y: number} |
moves character by specified fields |
subscribeChanges |
void | id: string, callback: Function |
will get executed if any character changes |
unsubscribeChanges |
void | id: string, callback: Function |
unsubscribed callbacks from above |