/** * Options of the `script` component accepted by {@link ScriptComponentSystem} that differ from the * properties of {@link ScriptComponent}. Each replaces the same-named property of the options that * {@link Entity#addComponent} derives from the component class; see * {@link ComponentOptionsOverrides}. */ export type ScriptComponentOptionsOverrides = { /** * - Names of the scripts to create, in execution order. Used together * with `scripts`. */ order?: string[]; /** * - * Initialization of each script to create, keyed by script name: its `enabled` state and * `attributes` values. Used together with `order`. */ scripts?: { [name: string]: { enabled?: boolean; attributes?: object; }; }; }; /** * Manages the {@link ScriptComponent}s of an application. Reach it through `app.systems.script`; * components are created with {@link Entity#addComponent}, never by calling the system directly. * * @category Script */ export class ScriptComponentSystem extends ComponentSystem { id: string; ComponentType: typeof ScriptComponent; _components: SortedLoopArray; _enabledComponents: SortedLoopArray; preloading: boolean; initializeComponentData(component: any, data: any): void; cloneComponent(entity: any, clone: any): import("../component.js").Component; _resetExecutionOrder(): void; _callComponentMethod(components: any, name: any, dt: any): void; _onInitialize(): void; _onPostInitialize(): void; _onUpdate(dt: any): void; _onPostUpdate(dt: any): void; _addComponentToEnabled(component: any): void; _removeComponentFromEnabled(component: any): void; onBeforeRemove(entity: any, component: any): void; } import { ComponentSystem } from '../system.js'; import { ScriptComponent } from './component.js'; import { SortedLoopArray } from '../../../core/sorted-loop-array.js';