Drag[en]gine Script Module DragonScript  1.21
Dragengine.Preloading.StubGameWorld Class Reference

Stub for constructing game world. More...

Inheritance diagram for Dragengine.Preloading.StubGameWorld:
Dragengine.Preloading.StubWithProperties

Public Member Functions

void addElement (StubElement element)
 Add element stub. More...
 
void addElementClassesTo (PreloadManager preloadManager)
 Add all element classes to the preload manager. More...
 
void addNavigationSpace (NavigationSpace navspace)
 Add navigation space. More...
 
void addWorldDecal (StubWorldDecal worldDecal)
 Add world decal stub. More...
 
void beginPreloading ()
 Begin preloading resources. More...
 
void createAndAddElements (Console console)
 Create and add all elements. More...
 
void forEachElement (Block ablock)
 Visit element stubs using block with StubElement as parameter. More...
 
void forEachWorldDecal (Block ablock)
 Visit world decal stubs using block with StubWorldDecal as parameter. More...
 
StubElement getElementAt (int index)
 Element stub at index. More...
 
NavigationSpace getNavigationSpaceAt (int index)
 Navigation space at index. More...
 
StubWorldDecal getWorldDecalAt (int index)
 World decal stub at index. More...
 
void loadResources ()
 Loading resources. More...
 
StubGameWorld new (GameWorld gameWorld, PreloadCounter parentCounter)
 Create stub. More...
 
StubGameWorld new (StubGameWorld stub)
 Create copy of stub. More...
 
void preloadWorldDecalResources ()
 Preload world decal resources. More...
 
void remapObjectIDs (UniqueIDRemapper remapper)
 Remap object IDs. More...
 
void removeAllElements ()
 Remove all elements. More...
 
void removeAllNavigationSpaces ()
 Remove all navigation spaces. More...
 
void setNewElementsRange (UniqueIDRemapper.RemapEntry range)
 Set range of new elements added since the last saving or null. More...
 
void setNextObjectID (UniqueID nextObjectID)
 Set next object ID. More...
 
bool updatePreloading ()
 Update preloading. More...
 
bool verifyPreloading (Console console)
 Verify if resources failed preloading printing problems to console. More...
 
void worldAddNavigationSpaces ()
 Add navigation spaces to world. More...
 
- Public Member Functions inherited from Dragengine.Preloading.StubWithProperties
bool getPropertyBoolFor (String key, bool default)
 Boolean property value or default value if absent. More...
 
int getPropertyCount ()
 Number of properties. More...
 
float getPropertyFloatFor (String key, float default)
 Floating point property value or default value if absent. More...
 
int getPropertyIntFor (String key, int default)
 Integer property value or default value if absent. More...
 
Array getPropertyKeys ()
 Property keys (String array). More...
 
String getPropertyValueFor (String key, String default)
 Value of property or default value if absent. More...
 
bool hasPropertyWithKey (String key)
 Property key is present. More...
 
StubWithProperties new ()
 Create stub with properties. More...
 
StubWithProperties new (StubWithProperties stub)
 Create copy of stub with properties. More...
 
void readPropertiesFromFile (FileReader reader)
 Read properties from file. More...
 
void removeAllProperties ()
 Remove all properties. More...
 
void removePropertyWithKey (String key)
 Remove property if present. More...
 
void setFrom (StubWithProperties properties)
 Set properties from another StubWithProperties. More...
 
void setPropertyBoolFor (String key, bool value)
 Set property. More...
 
void setPropertyFloatFor (String key, float value)
 Set property. More...
 
void setPropertyIntFor (String key, int value)
 Set property. More...
 
void setPropertyValueFor (String key, String value)
 Set property. More...
 
void writePropertiesToFile (FileWriter writer)
 Write properties to file. More...
 

Detailed Description

Stub for constructing game world.

Supports preloading resources in the background as well as game world creation.

Member Function Documentation

◆ addElement()

void Dragengine.Preloading.StubGameWorld.addElement ( StubElement  element)

Add element stub.

◆ addElementClassesTo()

void Dragengine.Preloading.StubGameWorld.addElementClassesTo ( PreloadManager  preloadManager)

Add all element classes to the preload manager.

◆ addNavigationSpace()

void Dragengine.Preloading.StubGameWorld.addNavigationSpace ( NavigationSpace  navspace)

Add navigation space.

◆ addWorldDecal()

void Dragengine.Preloading.StubGameWorld.addWorldDecal ( StubWorldDecal  worldDecal)

Add world decal stub.

◆ beginPreloading()

void Dragengine.Preloading.StubGameWorld.beginPreloading ( )

Begin preloading resources.

◆ createAndAddElements()

void Dragengine.Preloading.StubGameWorld.createAndAddElements ( Console  console)

Create and add all elements.

Call for newly create game worlds. For loading game worlds use:

  • createAndAddNonPersistableElements()
  • createAndAddPersistableElements()
  • loadAndAddPersistableElements()

◆ forEachElement()

void Dragengine.Preloading.StubGameWorld.forEachElement ( Block  ablock)

Visit element stubs using block with StubElement as parameter.

◆ forEachWorldDecal()

void Dragengine.Preloading.StubGameWorld.forEachWorldDecal ( Block  ablock)

Visit world decal stubs using block with StubWorldDecal as parameter.

◆ getElementAt()

StubElement Dragengine.Preloading.StubGameWorld.getElementAt ( int  index)

Element stub at index.

◆ getNavigationSpaceAt()

NavigationSpace Dragengine.Preloading.StubGameWorld.getNavigationSpaceAt ( int  index)

Navigation space at index.

◆ getWorldDecalAt()

StubWorldDecal Dragengine.Preloading.StubGameWorld.getWorldDecalAt ( int  index)

World decal stub at index.

◆ loadResources()

void Dragengine.Preloading.StubGameWorld.loadResources ( )

Loading resources.

◆ new() [1/2]

StubGameWorld Dragengine.Preloading.StubGameWorld.new ( GameWorld  gameWorld,
PreloadCounter  parentCounter 
)

Create stub.

◆ new() [2/2]

StubGameWorld Dragengine.Preloading.StubGameWorld.new ( StubGameWorld  stub)

Create copy of stub.

◆ preloadWorldDecalResources()

void Dragengine.Preloading.StubGameWorld.preloadWorldDecalResources ( )

Preload world decal resources.

◆ remapObjectIDs()

void Dragengine.Preloading.StubGameWorld.remapObjectIDs ( UniqueIDRemapper  remapper)

Remap object IDs.

◆ removeAllElements()

void Dragengine.Preloading.StubGameWorld.removeAllElements ( )

Remove all elements.

◆ removeAllNavigationSpaces()

void Dragengine.Preloading.StubGameWorld.removeAllNavigationSpaces ( )

Remove all navigation spaces.

◆ setNewElementsRange()

void Dragengine.Preloading.StubGameWorld.setNewElementsRange ( UniqueIDRemapper.RemapEntry  range)

Set range of new elements added since the last saving or null.

◆ setNextObjectID()

void Dragengine.Preloading.StubGameWorld.setNextObjectID ( UniqueID  nextObjectID)

Set next object ID.

◆ updatePreloading()

bool Dragengine.Preloading.StubGameWorld.updatePreloading ( )

Update preloading.

Returns false if the preloading has not yet finished. If all resources are loaded the game world and the individual elements are updated and the required engine objects created. Once all this has been done true is returned.

◆ verifyPreloading()

bool Dragengine.Preloading.StubGameWorld.verifyPreloading ( Console  console)

Verify if resources failed preloading printing problems to console.

Returns
true if all resources loaded successfully or false otherwise.

◆ worldAddNavigationSpaces()

void Dragengine.Preloading.StubGameWorld.worldAddNavigationSpaces ( )

Add navigation spaces to world.


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