LogoPixi’VN
indexFunctions

Function: newLabel()

> newLabel<T>(id, steps, props?): Label<T>

Defined in: src/narration/decorators/newLabel.ts:15

Creates a new label and registers it in the system. This function must be called at least once at system startup to register the label, otherwise the system cannot be used.

Type Parameters

T

T extends object = { }

Parameters

id

string

A unique identifier. Used to reference the label in the game (must be unique).

steps

LabelSteps<T> | (() => LabelSteps<T>)

An array of functions to be executed in order. To create a dynamic array.

props?

LabelProps<Label<T>, number>

An object with the label's options

Returns

Label<T>

The created label

On this page