跳转到内容

AppContext

此内容尚不支持你的语言。

Defined in: context.ts:55

new AppContext(): AppContext

AppContext

readonly componentRegistry: Map<string, any>

Defined in: context.ts:56


editorBridge: EditorBridge | null = null

Defined in: context.ts:58


editorMode: boolean = false

Defined in: context.ts:69

Run mode. editorMode = an editor host is attached (vs a standalone runtime); playMode = within an editor, gameplay is running. Gameplay systems gate on these via playModeOnly (env.ts). Kept here so all app-scoped mutable state lives on one context (with componentRegistry / editorBridge / pendingSystems) rather than in a separate module global, so isolated Apps get isolated run modes.


readonly pendingSystems: PendingSystemEntry[] = []

Defined in: context.ts:57


playMode: boolean = false

Defined in: context.ts:70


readonly wasmError: WasmErrorState

Defined in: context.ts:59

drainPendingSystems(): PendingSystemEntry[]

Defined in: context.ts:73

PendingSystemEntry[]

Drain all pending systems and clear the queue


reset(): void

Defined in: context.ts:79

void

Reset all mutable state for a new session