SymbolRegistry
pixi-reels / index / SymbolRegistry
Class: SymbolRegistry
Defined in: symbols/SymbolRegistry.ts:15
Registry that maps symbolIds to their constructors and options.
Used by the builder and SymbolFactory to create symbols on demand.
Constructors#
Constructor#
new SymbolRegistry(): SymbolRegistry;
Returns#
SymbolRegistry
Accessors#
size#
Get Signature#
get size(): number;
Defined in: symbols/SymbolRegistry.ts:57
Returns
number
symbolIds#
Get Signature#
get symbolIds(): string[];
Defined in: symbols/SymbolRegistry.ts:53
Returns
string[]
Methods#
create()#
create(symbolId: string): ReelSymbol;
Defined in: symbols/SymbolRegistry.ts:37
Create a new symbol instance for the given symbolId.
Parameters#
| Parameter | Type |
|---|---|
symbolId | string |
Returns#
has()#
has(symbolId: string): boolean;
Defined in: symbols/SymbolRegistry.ts:49
Parameters#
| Parameter | Type |
|---|---|
symbolId | string |
Returns#
boolean
register()#
register<T extends ReelSymbol>(
symbolId: string,
SymbolClass: (options: any) => T,
options: T extends {
constructor: (options: O) => any;
} ? O : any
): void;
Defined in: symbols/SymbolRegistry.ts:25
Register a symbol type.
registry.register('cherry', SpriteSymbol, { textures: { cherry: tex } });
Type Parameters#
| Type Parameter |
|---|
T extends ReelSymbol |
Parameters#
| Parameter | Type |
|---|---|
symbolId | string |
SymbolClass | (options: any) => T |
options | T extends { constructor: (options: O) => any; } ? O : any |
Returns#
void