cyber2d / Modules / Scenes/ScenePreloadAssets / ScenePreloadAssets
Scenes/ScenePreloadAssets.ScenePreloadAssets
-
↳
ScenePreloadAssets
- add
- anims
- cache
- cameras
- children
- data
- events
- game
- input
- lights
- load
- make
- matter
- physics
- plugins
- registry
- renderer
- scale
- scene
- sound
- splashScreen
- sys
- textures
- time
- tweens
- centerHItem
- centerItem
- centerVItem
- create
- createAudioManager
- createMainMenu
- createPlatformAtlas
- createWeaponAtlas
- init
- loadAudioSprite
- loadPawns
- loadPlatforms
- loadVideos
- loadWeapons
- preload
- update
- formatTime
- generateUniqueName
• new ScenePreloadAssets()
src/Scenes/ScenePreloadAssets.ts:11
• add: GameObjectFactory
The Scene Game Object Factory.
This property will only be available if defined in the Scene Injection Map.
node_modules/phaser/types/phaser.d.ts:86271
• anims: AnimationManager
A reference to the global Animation Manager.
This property will only be available if defined in the Scene Injection Map.
node_modules/phaser/types/phaser.d.ts:86222
• cache: CacheManager
A reference to the global Cache.
This property will only be available if defined in the Scene Injection Map.
node_modules/phaser/types/phaser.d.ts:86229
• cameras: CameraManager
The Scene Camera Manager.
This property will only be available if defined in the Scene Injection Map.
node_modules/phaser/types/phaser.d.ts:86264
• children: DisplayList
The Game Object Display List belonging to this Scene.
This property will only be available if defined in the Scene Injection Map.
node_modules/phaser/types/phaser.d.ts:86292
• 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.
node_modules/phaser/types/phaser.d.ts:86308
• events: EventEmitter
A Scene specific Event Emitter.
This property will only be available if defined in the Scene Injection Map.
node_modules/phaser/types/phaser.d.ts:86257
• 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.
node_modules/phaser/types/phaser.d.ts:86357
• game: Game
A reference to the Phaser.Game instance.
This property will only be available if defined in the Scene Injection Map.
node_modules/phaser/types/phaser.d.ts:86215
• 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.
node_modules/phaser/types/phaser.d.ts:86315
• 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.
node_modules/phaser/types/phaser.d.ts:86299
• load: LoaderPlugin
The Scene Loader Plugin.
This property will only be available if defined in the Scene Injection Map and the plugin is installed.
node_modules/phaser/types/phaser.d.ts:86322
• make: GameObjectCreator
The Scene Game Object Creator.
This property will only be available if defined in the Scene Injection Map.
node_modules/phaser/types/phaser.d.ts:86278
• 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.
node_modules/phaser/types/phaser.d.ts:86350
• 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.
node_modules/phaser/types/phaser.d.ts:86343
• 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.
node_modules/phaser/types/phaser.d.ts:86372
• registry: DataManager
A reference to the global Data Manager.
This property will only be available if defined in the Scene Injection Map.
node_modules/phaser/types/phaser.d.ts:86236
• renderer: CanvasRenderer
| WebGLRenderer
A reference to the renderer instance Phaser is using, either Canvas Renderer or WebGL Renderer.
node_modules/phaser/types/phaser.d.ts:86377
• scale: ScaleManager
A reference to the global Scale Manager.
This property will only be available if defined in the Scene Injection Map.
node_modules/phaser/types/phaser.d.ts:86364
• scene: ScenePlugin
A reference to the Scene Manager Plugin.
This property will only be available if defined in the Scene Injection Map.
node_modules/phaser/types/phaser.d.ts:86285
• 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.
node_modules/phaser/types/phaser.d.ts:86243
• Private
splashScreen: SplashScreen
src/Scenes/ScenePreloadAssets.ts:9
• sys: Systems
The Scene Systems. You must never overwrite this property, or all hell will break lose.
node_modules/phaser/types/phaser.d.ts:86208
• textures: TextureManager
A reference to the Texture Manager.
This property will only be available if defined in the Scene Injection Map.
node_modules/phaser/types/phaser.d.ts:86250
• 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.
node_modules/phaser/types/phaser.d.ts:86329
• 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.
node_modules/phaser/types/phaser.d.ts:86336
▸ centerHItem(item
, offsetX?
): CenterableObject
Name | Type | Default value |
---|---|---|
item |
CenterableObject |
undefined |
offsetX |
number |
0 |
CenterableObject
▸ centerItem(item
, offsetX?
, offsetY?
): CenterableObject
Name | Type | Default value |
---|---|---|
item |
CenterableObject |
undefined |
offsetX |
number |
0 |
offsetY |
number |
0 |
CenterableObject
▸ centerVItem(item
, offsetY?
): CenterableObject
Name | Type | Default value |
---|---|---|
item |
CenterableObject |
undefined |
offsetY |
number |
0 |
CenterableObject
▸ create(): void
void
src/Scenes/ScenePreloadAssets.ts:80
▸ Private
createAudioManager(): void
void
src/Scenes/ScenePreloadAssets.ts:115
▸ Private
createMainMenu(): void
void
src/Scenes/ScenePreloadAssets.ts:101
▸ Private
createPlatformAtlas(): void
void
src/Scenes/ScenePreloadAssets.ts:88
▸ Private
createWeaponAtlas(): void
void
src/Scenes/ScenePreloadAssets.ts:95
▸ init(): void
void
src/Scenes/ScenePreloadAssets.ts:19
▸ 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
void
src/Scenes/ScenePreloadAssets.ts:44
▸ Private
loadPawns(): void
void
src/Scenes/ScenePreloadAssets.ts:56
▸ Private
loadPlatforms(): void
void
src/Scenes/ScenePreloadAssets.ts:70
▸ Private
loadVideos(): void
void
src/Scenes/ScenePreloadAssets.ts:50
▸ Private
loadWeapons(): void
void
src/Scenes/ScenePreloadAssets.ts:63
▸ preload(): void
void
src/Scenes/ScenePreloadAssets.ts:26
▸ 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.
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. |
void
node_modules/phaser/types/phaser.d.ts:86386
▸ Static
formatTime(milliseconds
): string
Name | Type |
---|---|
milliseconds |
number |
string
▸ Static
generateUniqueName(gameObject
): string
Name | Type |
---|---|
gameObject |
GameObject |
string