Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Game

Hierarchy

  • Game

Implements

Index

Constructors

constructor

Properties

Private _assetManager

_assetManager: AssetManager

Private _audioSystemManager

_audioSystemManager: AudioSystemManager

Private _cameraIdx

_cameraIdx: number

Private _configuration

_configuration: GameConfiguration

Private _defaultLoadingScene

_defaultLoadingScene: LoadingScene

Private _eventTriggerMap

_eventTriggerMap: object

Type declaration

Private _focusingCamera

_focusingCamera: Camera

Private _idx

_idx: number

Private _initialScene

_initialScene: Scene

Private _isTerminated

_isTerminated: boolean

Private _loaded

_loaded: Trigger<Game>

Private _localDb

_localDb: object

Type declaration

  • [id: number]: E

Private _localIdx

_localIdx: number

Private _main

_main: string

Private _mainParameter

_mainParameter: GameMainParameterObject

Private _operationPluginManager

_operationPluginManager: OperationPluginManager

Private _operationPluginOperated

_operationPluginOperated: Trigger<InternalOperationPluginOperation>

Private _sceneChanged

_sceneChanged: Trigger<Scene>

Private _scriptCaches

_scriptCaches: object

Type declaration

Private _started

_started: Trigger<void>

age

age: number

assetBase

assetBase: string

assets

assets: object

Type declaration

audio

audio: object

Type declaration

db

db: object

Type declaration

  • [idx: number]: E

defaultAudioSystemId

defaultAudioSystemId: string

events

events: Event[]

external

external: any

focusingCamera

focusingCamera: Camera

fps

fps: number

height

height: number

isLoaded

isLoaded: boolean

join

leave

loadingScene

loadingScene: LoadingScene

logger

logger: Logger

modified

modified: boolean

operationPlugins

operationPlugins: object

Type declaration

playId

playId: string

random

random: RandomGenerator[]

renderers

renderers: Renderer[]

resized

resourceFactory

resourceFactory: ResourceFactory

scenes

scenes: Scene[]

seed

selfId

selfId: string

snapshotRequest

snapshotRequest: Trigger<void>

storage

storage: Storage

vars

vars: any

width

width: number

Methods

Private _abortGame

  • _abortGame(): void
  • Returns void

Private _callSceneAssetHolderHandler

  • Parameters

    Returns void

Private _decodeOperationPluginOperation

  • _decodeOperationPluginOperation(code: number, op: (string | number)[]): any
  • Parameters

    • code: number
    • op: (string | number)[]

    Returns any

Private _destroy

  • _destroy(): void
  • Returns void

Private _fireSceneLoaded

  • _fireSceneLoaded(scene: Scene): void
  • Parameters

    Returns void

Private _fireSceneReady

  • _fireSceneReady(scene: Scene): void
  • Parameters

    Returns void

Private _flushSceneChangeRequests

  • _flushSceneChangeRequests(): void
  • Returns void

Private _leaveGame

  • _leaveGame(): void
  • Returns void

Private _loadAndStart

Private _normalizeConfiguration

Private _onInitialSceneLoaded

  • _onInitialSceneLoaded(): void
  • Returns void

Private _reset

Private _setAudioPlaybackRate

  • _setAudioPlaybackRate(playbackRate: number): void
  • Parameters

    • playbackRate: number

    Returns void

Private _setMuted

  • _setMuted(muted: boolean): void
  • Parameters

    • muted: boolean

    Returns void

Private _startLoadingGlobalAssets

  • _startLoadingGlobalAssets(): void
  • Returns void

Private _updateEventTriggers

  • _updateEventTriggers(scene: Scene): void
  • Parameters

    Returns void

addEventFilter

  • addEventFilter(filter: EventFilter, handleEmpty?: boolean): void
  • Parameters

    Returns void

findPointSource

leaveGame

  • leaveGame(): void
  • Returns void

popScene

  • popScene(preserveCurrent?: boolean): void
  • Parameters

    • Optional preserveCurrent: boolean

    Returns void

pushScene

  • pushScene(scene: Scene): void
  • Parameters

    Returns void

raiseEvent

  • raiseEvent(e: Event): void
  • Parameters

    Returns void

raiseTick

  • raiseTick(events?: Event[]): void
  • Parameters

    • Optional events: Event[]

    Returns void

register

  • register(e: E): void
  • Parameters

    • e: E

    Returns void

removeEventFilter

  • Parameters

    Returns void

render

  • render(camera?: Camera): void
  • Parameters

    Returns void

replaceScene

  • replaceScene(scene: Scene, preserveCurrent?: boolean): void
  • Parameters

    • scene: Scene
    • Optional preserveCurrent: boolean

    Returns void

saveSnapshot

  • saveSnapshot(snapshot: any, timestamp?: number): void
  • Parameters

    • snapshot: any
    • Optional timestamp: number

    Returns void

scene

  • Returns Scene

shouldSaveSnapshot

  • shouldSaveSnapshot(): boolean
  • Returns boolean

terminateGame

  • terminateGame(): void
  • Returns void

tick

  • tick(advanceAge?: boolean): boolean
  • Parameters

    • Optional advanceAge: boolean

    Returns boolean

unregister

  • unregister(e: E): void
  • Parameters

    • e: E

    Returns void

Generated using TypeDoc