Function: add()
> add(...characters): void
Defined in: src/characters/decorators/RegisteredCharacters.ts:51
Is a function that saves the character. If the character already exists, it will be overwritten.
Parameters
characters
...(CharacterInterface | CharacterInterface[])[]
is the character(s) 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);
RegisteredCharacters.add([liam, alice]);