Drag[en]gine Script Module DragonScript Script API  1.0
PreloadManager Class Reference

Helper class for preloading resources. More...

Inheritance diagram for PreloadManager:

Public Member Functions

void addElementClass (ElementClass elementClass)
 Add element class if absent. More...
 
void addElementClassDependencies ()
 Add element classes registered classes depend upon. More...
 
PreloadCounter getCounter ()
 Preload counter. More...
 
PreloadManager new ()
 Create preload manager instance. More...
 
void preloadElementClasses ()
 Preload element classes. More...
 
void removeAllElementClasses ()
 Remove all element classes. More...
 
void reset ()
 Reset preload manager to initial state. More...
 

Detailed Description

Helper class for preloading resources.

To properly track the progress of preloading do the following:

  • Add all element classes to the manager
  • For all StubGameWorld set this counter as the parent of the stub counter
  • For all other loading tasks use this counter

Doing so this counter can be used to monitor the entire loading process.

Member Function Documentation

◆ addElementClass()

void addElementClass ( ElementClass  elementClass)

Add element class if absent.

◆ addElementClassDependencies()

void addElementClassDependencies ( )

Add element classes registered classes depend upon.

Call this function before calling the preloadElementClasses function.

◆ getCounter()

PreloadCounter getCounter ( )

Preload counter.

◆ new()

PreloadManager new ( )

Create preload manager instance.

◆ preloadElementClasses()

void preloadElementClasses ( )

Preload element classes.

◆ removeAllElementClasses()

void removeAllElementClasses ( )

Remove all element classes.

◆ reset()

void reset ( )

Reset preload manager to initial state.


The documentation for this class was generated from the following file: