LogoPixi’VN
indexNamespacesRegisteredCharactersFunctions

Function: add()

> add(character): void

Defined in: src/characters/decorators/character-decorator.ts:44

Is a function that saves the character. If the character already exists, it will be overwritten.

Parameters

character

CharacterInterface | CharacterInterface[]

is the character to save

Returns

void

Example

export const liam = new CharacterBaseModel('liam', { name: 'Liam'});
export const alice = new CharacterBaseModel('alice', { name: 'Alice'});
RegisteredCharacters.add([liam, alice]);