Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Game

export

Hierarchy

  • Game

Index

Constructors

constructor

  • Returns Game

Properties

Readonly animationSystem

animationSystem: default

Readonly customEventEmitter

customEventEmitter: EventEmitter = ...

Readonly detachedRoot

detachedRoot: Entity & { transform2D: Transform2D } & { transform: Transform3D }

Optional Readonly editorRootEntity

editorRootEntity: Entity & { transform2D: Transform2D } & { transform: Transform3D }

gameTime

gameTime: number = 0

lastFrameTime

lastFrameTime: number = 0

Readonly layoutSystem

layoutSystem: default

Readonly lightEvent

lightEvent: Emitter<default, LightEventType> = ...

Readonly lightSystem

lightSystem: default

mainFrameCnt

mainFrameCnt: number = 0

Readonly meshRendererEvent

meshRendererEvent: Emitter<MeshRenderer, MeshRendererEventType> = ...

Readonly nodeSystem

nodeSystem: default

Readonly persistEntities

persistEntities: Set<Entity> = ...

Readonly physicsSystem

physicsSystem: PhysicsSystem

Readonly pipelineEvent

pipelineEvent: Emitter<ClearAllCache, void> = ...

Readonly renderSystem

renderSystem: RenderSystem

Readonly root

root: Entity3D

Readonly rootUICamera

rootUICamera: UICamera

Readonly rootUICanvas

rootUICanvas: UICanvas

Readonly sceneRoot

sceneRoot: Entity & { transform2D: Transform2D } & { transform: Transform3D }

startTime

startTime: number = 0

Readonly streamingLoadingSystem

streamingLoadingSystem: StreamingLoadingSystem

Readonly touchEvent

touchEvent: Emitter<RawTouchEvents, TouchEvent> = ...

Readonly workerSystem

workerSystem: WorkerSystem

Accessors

activeScene

  • get activeScene(): Scene3D
  • Returns Scene3D

activeScene2D

  • get activeScene2D(): Scene2D
  • Returns Scene2D

Methods

clearScene

  • clearScene(clear3D: boolean, clear2D: boolean): void
  • Parameters

    • clear3D: boolean
    • clear2D: boolean

    Returns void

createEntity2D

  • createEntity2D(name?: string): Entity2D
  • Parameters

    • name: string = ...

    Returns Entity2D

createEntity3D

  • createEntity3D(name?: string): Entity3D
  • Parameters

    • name: string = ...

    Returns Entity3D

createWorkerJob

  • createWorkerJob(jobPath: string, data: any): WorkerJob
  • deprecated

    请使用game.workerSystem.createJob代替

    Parameters

    • jobPath: string
    • data: any

    Returns WorkerJob

dispose

  • dispose(): void
  • Returns void

dumpScene

  • dumpScene(): [string, string]
  • Returns [string, string]

initWorkerSystem

  • initWorkerSystem(): void
  • 让game使用当前启用的worker。
    如果有之前在使用着的worker,会清空job队列。

    Returns void

markAsPersist

  • markAsPersist(entity: Entity): void
  • Parameters

    Returns void

playScene

  • Parameters

    Returns Entity

rpc

  • rpc(funcName: string, data: any, callback: (data: any) => void): void
  • TODO
    in progress

    Parameters

    • funcName: string
    • data: any
    • callback: (data: any) => void
        • (data: any): void
        • Parameters

          • data: any

          Returns void

    Returns void

run

  • run(): void
  • Returns void

Generated using TypeDoc