Skip to content

Character functions

Ondolin edited this page Mar 10, 2021 · 3 revisions

There are two types of character functions.

  1. functions on specific characters
  2. global functions

Character specific functions

There is a hole article on those functions here.

Global functions

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
Clone this wiki locally