Skip to content

Latest commit

 

History

History
865 lines (464 loc) · 19 KB

Scenes_ScenePreloadAssets.ScenePreloadAssets.md

File metadata and controls

865 lines (464 loc) · 19 KB

cyber2d / Modules / Scenes/ScenePreloadAssets / ScenePreloadAssets

Class: ScenePreloadAssets

Scenes/ScenePreloadAssets.ScenePreloadAssets

Hierarchy

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new ScenePreloadAssets()

Overrides

CYBR_Scene.constructor

Defined in

src/Scenes/ScenePreloadAssets.ts:11

Properties

add

add: GameObjectFactory

The Scene Game Object Factory.

This property will only be available if defined in the Scene Injection Map.

Inherited from

CYBR_Scene.add

Defined in

node_modules/phaser/types/phaser.d.ts:86271


anims

anims: AnimationManager

A reference to the global Animation Manager.

This property will only be available if defined in the Scene Injection Map.

Inherited from

CYBR_Scene.anims

Defined in

node_modules/phaser/types/phaser.d.ts:86222


cache

cache: CacheManager

A reference to the global Cache.

This property will only be available if defined in the Scene Injection Map.

Inherited from

CYBR_Scene.cache

Defined in

node_modules/phaser/types/phaser.d.ts:86229


cameras

cameras: CameraManager

The Scene Camera Manager.

This property will only be available if defined in the Scene Injection Map.

Inherited from

CYBR_Scene.cameras

Defined in

node_modules/phaser/types/phaser.d.ts:86264


children

children: DisplayList

The Game Object Display List belonging to this Scene.

This property will only be available if defined in the Scene Injection Map.

Inherited from

CYBR_Scene.children

Defined in

node_modules/phaser/types/phaser.d.ts:86292


data

data: DataManager

A Scene specific Data Manager Plugin.

See the registry property for the global Data Manager.

This property will only be available if defined in the Scene Injection Map and the plugin is installed.

Inherited from

CYBR_Scene.data

Defined in

node_modules/phaser/types/phaser.d.ts:86308


events

events: EventEmitter

A Scene specific Event Emitter.

This property will only be available if defined in the Scene Injection Map.

Inherited from

CYBR_Scene.events

Defined in

node_modules/phaser/types/phaser.d.ts:86257


facebook

facebook: FacebookInstantGamesPlugin

The Facebook Instant Games Plugin.

This property will only be available if defined in the Scene Injection Map, the plugin is installed and configured.

Inherited from

CYBR_Scene.facebook

Defined in

node_modules/phaser/types/phaser.d.ts:86357


game

game: Game

A reference to the Phaser.Game instance.

This property will only be available if defined in the Scene Injection Map.

Inherited from

CYBR_Scene.game

Defined in

node_modules/phaser/types/phaser.d.ts:86215


input

input: InputPlugin

The Scene Input Manager Plugin.

This property will only be available if defined in the Scene Injection Map and the plugin is installed.

Inherited from

CYBR_Scene.input

Defined in

node_modules/phaser/types/phaser.d.ts:86315


lights

lights: LightsManager

The Scene Lights Manager Plugin.

This property will only be available if defined in the Scene Injection Map and the plugin is installed.

Inherited from

CYBR_Scene.lights

Defined in

node_modules/phaser/types/phaser.d.ts:86299


load

load: LoaderPlugin

The Scene Loader Plugin.

This property will only be available if defined in the Scene Injection Map and the plugin is installed.

Inherited from

CYBR_Scene.load

Defined in

node_modules/phaser/types/phaser.d.ts:86322


make

make: GameObjectCreator

The Scene Game Object Creator.

This property will only be available if defined in the Scene Injection Map.

Inherited from

CYBR_Scene.make

Defined in

node_modules/phaser/types/phaser.d.ts:86278


matter

matter: MatterPhysics

The Scene Matter Physics Plugin.

This property will only be available if defined in the Scene Injection Map, the plugin is installed and configured.

Inherited from

CYBR_Scene.matter

Defined in

node_modules/phaser/types/phaser.d.ts:86350


physics

physics: ArcadePhysics

The Scene Arcade Physics Plugin.

This property will only be available if defined in the Scene Injection Map, the plugin is installed and configured.

Inherited from

CYBR_Scene.physics

Defined in

node_modules/phaser/types/phaser.d.ts:86343


plugins

plugins: PluginManager

A reference to the global Plugin Manager.

The Plugin Manager is a global system that allows plugins to register themselves with it, and can then install those plugins into Scenes as required.

Inherited from

CYBR_Scene.plugins

Defined in

node_modules/phaser/types/phaser.d.ts:86372


registry

registry: DataManager

A reference to the global Data Manager.

This property will only be available if defined in the Scene Injection Map.

Inherited from

CYBR_Scene.registry

Defined in

node_modules/phaser/types/phaser.d.ts:86236


renderer

renderer: CanvasRenderer | WebGLRenderer

A reference to the renderer instance Phaser is using, either Canvas Renderer or WebGL Renderer.

Inherited from

CYBR_Scene.renderer

Defined in

node_modules/phaser/types/phaser.d.ts:86377


scale

scale: ScaleManager

A reference to the global Scale Manager.

This property will only be available if defined in the Scene Injection Map.

Inherited from

CYBR_Scene.scale

Defined in

node_modules/phaser/types/phaser.d.ts:86364


scene

scene: ScenePlugin

A reference to the Scene Manager Plugin.

This property will only be available if defined in the Scene Injection Map.

Inherited from

CYBR_Scene.scene

Defined in

node_modules/phaser/types/phaser.d.ts:86285


sound

sound: NoAudioSoundManager | HTML5AudioSoundManager | WebAudioSoundManager

A reference to the Sound Manager.

This property will only be available if defined in the Scene Injection Map and the plugin is installed.

Inherited from

CYBR_Scene.sound

Defined in

node_modules/phaser/types/phaser.d.ts:86243


splashScreen

Private splashScreen: SplashScreen

Defined in

src/Scenes/ScenePreloadAssets.ts:9


sys

sys: Systems

The Scene Systems. You must never overwrite this property, or all hell will break lose.

Inherited from

CYBR_Scene.sys

Defined in

node_modules/phaser/types/phaser.d.ts:86208


textures

textures: TextureManager

A reference to the Texture Manager.

This property will only be available if defined in the Scene Injection Map.

Inherited from

CYBR_Scene.textures

Defined in

node_modules/phaser/types/phaser.d.ts:86250


time

time: Clock

The Scene Time and Clock Plugin.

This property will only be available if defined in the Scene Injection Map and the plugin is installed.

Inherited from

CYBR_Scene.time

Defined in

node_modules/phaser/types/phaser.d.ts:86329


tweens

tweens: TweenManager

The Scene Tween Manager Plugin.

This property will only be available if defined in the Scene Injection Map and the plugin is installed.

Inherited from

CYBR_Scene.tweens

Defined in

node_modules/phaser/types/phaser.d.ts:86336

Methods

centerHItem

centerHItem(item, offsetX?): CenterableObject

Parameters

Name Type Default value
item CenterableObject undefined
offsetX number 0

Returns

CenterableObject

Inherited from

CYBR_Scene.centerHItem

Defined in

src/Scenes/CYBR_Scene.ts:46


centerItem

centerItem(item, offsetX?, offsetY?): CenterableObject

Parameters

Name Type Default value
item CenterableObject undefined
offsetX number 0
offsetY number 0

Returns

CenterableObject

Inherited from

CYBR_Scene.centerItem

Defined in

src/Scenes/CYBR_Scene.ts:27


centerVItem

centerVItem(item, offsetY?): CenterableObject

Parameters

Name Type Default value
item CenterableObject undefined
offsetY number 0

Returns

CenterableObject

Inherited from

CYBR_Scene.centerVItem

Defined in

src/Scenes/CYBR_Scene.ts:38


create

create(): void

Returns

void

Defined in

src/Scenes/ScenePreloadAssets.ts:80


createAudioManager

Private createAudioManager(): void

Returns

void

Defined in

src/Scenes/ScenePreloadAssets.ts:115


createMainMenu

Private createMainMenu(): void

Returns

void

Defined in

src/Scenes/ScenePreloadAssets.ts:101


createPlatformAtlas

Private createPlatformAtlas(): void

Returns

void

Defined in

src/Scenes/ScenePreloadAssets.ts:88


createWeaponAtlas

Private createWeaponAtlas(): void

Returns

void

Defined in

src/Scenes/ScenePreloadAssets.ts:95


init

init(): void

Returns

void

Defined in

src/Scenes/ScenePreloadAssets.ts:19


loadAudioSprite

Private loadAudioSprite(): void

Load audios from an audio sprite. Below is an example to generate an audio sprite from audios (make sure to run in admin). audiosprite -e "mp3,ogg" -o ./audiosprite *.mp3 -f howler Check https://www.npmjs.com/package/audiosprite

Returns

void

Defined in

src/Scenes/ScenePreloadAssets.ts:44


loadPawns

Private loadPawns(): void

Returns

void

Defined in

src/Scenes/ScenePreloadAssets.ts:56


loadPlatforms

Private loadPlatforms(): void

Returns

void

Defined in

src/Scenes/ScenePreloadAssets.ts:70


loadVideos

Private loadVideos(): void

Returns

void

Defined in

src/Scenes/ScenePreloadAssets.ts:50


loadWeapons

Private loadWeapons(): void

Returns

void

Defined in

src/Scenes/ScenePreloadAssets.ts:63


preload

preload(): void

Returns

void

Defined in

src/Scenes/ScenePreloadAssets.ts:26


update

update(time, delta): void

This method should be overridden by your own Scenes.

This method is called once per game step while the scene is running.

Parameters

Name Type Description
time number The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.
delta number The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.

Returns

void

Inherited from

CYBR_Scene.update

Defined in

node_modules/phaser/types/phaser.d.ts:86386


formatTime

Static formatTime(milliseconds): string

Parameters

Name Type
milliseconds number

Returns

string

Inherited from

CYBR_Scene.formatTime

Defined in

src/Scenes/CYBR_Scene.ts:54


generateUniqueName

Static generateUniqueName(gameObject): string

Parameters

Name Type
gameObject GameObject

Returns

string

Inherited from

CYBR_Scene.generateUniqueName

Defined in

src/Scenes/CYBR_Scene.ts:21