LoadManager
Manages all asset loading.
Extends
Container
Constructors
new LoadManager()
new LoadManager(
app
,pSplashScreen
):LoadManager
Creates an instance of a LoadManager
and returns it.
Parameters
• app: Application
<any
>
The parant
• pSplashScreen: SplashScreen
The splashscreen instance to use.
Returns
Overrides
Container.constructor
Link
Source
Accessors
debug
set
debug(pEnabled
):void
Enabling this will print all debug logs.
Parameters
• pEnabled: boolean
Source
defaultLoadScreen
get
defaultLoadScreen():undefined
|LoadScreenProvider
Returns
undefined
| LoadScreenProvider
Source
defaultLoadScreenId
get
defaultLoadScreenId():undefined
|string
Returns
undefined
| string
Source
Methods
onResize()
onResize(
pSize
):void
Called when the window is resized.
Parameters
• pSize: Point
The new size.
Returns
void
Source
registerLoadScreen()
registerLoadScreen(
pIdOrClass
,pScreen
?,pDefault
?):void
Registers a load screen.
Parameters
• pIdOrClass: string
| typeof LoadScreen
The id of the new state or the class of the new state.
• pScreen?: LoadScreenProvider
The load screen.
• pDefault?: boolean
= false
Is the new load screen the default one.
Returns
void
Source
startSplashProcess()
startSplashProcess(
pPersistentAssets
,pOnComplete
):void
Begins the initial splash process.
Parameters
• pPersistentAssets: AssetMapData
[]
The assets that should persist between all state changes.
• pOnComplete
The function to call after all persitent assets have been loaded.
Returns
void
Description
- Splash screen assets loaded.
- Splash screen is shown.
- Persistent assets are loaded.
- Callback passed in is called.
Source
update()
update(
pDeltaTime
):void
Updates the current active load screen.
Parameters
• pDeltaTime: number
PIXI.ticker.shared.elapsedMS / 1000.
Returns
void