-
Notifications
You must be signed in to change notification settings - Fork 0
Player functions
Ondolin edited this page Mar 10, 2021
·
2 revisions
There are two types of player functions.
- functions on specific players
- global functions
There is a hole article on those functions here.
Those functions are located in torchly.players.
Function name | return value | parameters | description |
---|---|---|---|
add |
void | Player |
add a new Player |
getCharactersByPlayerID |
Character[] |
id: string |
returns all characters controlled by the player with the provided id |
forceUpdatePlayers |
void | - | query players from backend, even if there is no subscription trigger |
getByID |
Player OR undefind |
id: string
|
eturns the player with the the provided id or undefined if the is none |
subscribeChanges |
void | id: string, callback: Function |
will get executed if any character changes |
unsubscribeChanges |
void | id: string, callback: Function |
unsubscribed callbacks from above |