import { ComponentType, ReactElement } from "react"; import { LogicComponent } from "./logic-component"; import { SceneManagement } from "./scene-management"; import { WorldManagement } from "./world-management"; import { EntitySuit } from "./entities/entity-suit"; import { Prefab } from "./prefab"; import { Sound } from "./sound"; import { AssetErrorType, AssetsFailBehavior, Avatar, GetSoundOptions, JoystickAction, SoundManagement } from "../export-types"; import { SoundType } from "../export-enums"; import { SimpleCamera } from "./simple-camera"; import { P5 } from "./p5"; import { TouchEvent } from "../ui-components/movement-control"; declare type SoundOptionsChangeListener = (options: SoundManagement[O]) => void; declare type LoadAssetsListener = (loadedAssets: boolean, errors?: { type: AssetErrorType; detail: any; }[]) => void; declare type EntityPropsChangeListener = (value: V) => void; declare type ProcessStateChangeListener = (isForeground: boolean) => void; declare type JoystickActionListener = (data: JoystickAction) => void; export declare abstract class Scene { private ui; private _worldManagement; private _loadedAssets; private _renderer; private _renderAssetsFail; private loadAssetsListener; private nativeEventsUnsubscribes; private readonly entityPropsChangeListeners; private readonly soundBackgroundOptionsChangeListeners; private readonly soundOnceOptionsChangeListeners; private readonly processStateChangeListeners; private readonly joystickActionListeners; private readonly prefabs; private readonly soundsDecor; private readonly spritesDecor; readonly sounds: Sound[]; readonly sprites: Avatar[]; readonly sessionId: string; assetsDelay: number; tag: string; manager: SceneManagement; constructor(); get renderer(): P5; get worldManagement(): WorldManagement; get renderAssetsFail(): () => ReactElement> | { type: AssetErrorType; detail: any; }[]; get UI(): ComponentType | (() => any); get soundBackgroundOptions(): SoundManagement[SoundType.BACKGROUND]; get soundOnceOptions(): SoundManagement[SoundType.ONCE]; set renderer(_renderer: P5); set soundBackgroundOptions(options: Partial); set soundOnceOptions(options: Partial); private bootSoundOptions; protected getSoundOptions(): GetSoundOptions; protected onBorn(): void; protected getComponents(simpleCamera: SimpleCamera): LogicComponent[]; getUIProps(): Partial; getInitialConfigs(): { joystick?: boolean | { containerTouchEvent?: TouchEvent; }; }; get loadedAssets(): boolean; private set loadedAssets(value); private set loadedAssetsError(value); onProcessStateChangeListener(func: ProcessStateChangeListener): () => void; onSoundOnceOptionsChange(func: SoundOptionsChangeListener): () => void; onSoundBackgroundOptionsChange(func: SoundOptionsChangeListener): () => void; onJoystickAction(func: JoystickActionListener): () => void; onEntityPropsChange(name: string, func: EntityPropsChangeListener): () => void; emitJoystickActionEvent(data: JoystickAction): void; emitProcessStateChangeEvent(isForeground: boolean): void; emitEntityPropsChangeEvent(name: string, value: V): void; onLoadAssetNotify(func: LoadAssetsListener): void; destructor(): void; switchToScene(tag: string): void; private loadSprites; private loadSounds; createSprites(...sources: (string | { src: string; })[]): Promise; createSounds(...sources: (string | { src: string; volume?: number; type?: SoundType; })[]): Promise; mapSprites(...sources: string[]): Promise; mapSounds(...sources: string[]): Promise; loadAssets(delay: number | undefined | null, { skip, render }?: AssetsFailBehavior): Promise; onLoadAssets(): Promise; getPrefab(Class: { new (...args: any[]): Prefab; }): Prefab; listenNativeEvents(): void; protected onBootstrapDone(simpleCamera: SimpleCamera): void; private bootstrapDone; bootstrap(simpleCamera: SimpleCamera): void; protected onDraw(): void; protected onUpdate(): void; mouseMove(): void; mousePressed(): void; mouseRelease(): void; action(): void; } export {}; //# sourceMappingURL=scene.d.ts.map