Drag[en]gine Script Module DragonScript  1.23
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...
 
int getNavigationSpaceCount ()
 Number of navigation spaces. 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 preloadElementResources ()
 Preload element resources. 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
Dictionary getProperties ()
 Copy of all properties as dictionary mapping String key to String value. More...
 
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 (Dictionary properties)
 Set all properties from dictionary mapping String key to String value. 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...
 

Public Attributes

PreloadCounter pCounter
 
Array pElements
 
GameWorld pGameWorld
 
Array pNavSpaces
 
UniqueIDRemapper.RemapEntry pNewElementsRange
 
UniqueID pNextObjectID
 
Array pWorldDecals
 
- Public Attributes inherited from Dragengine.Preloading.StubWithProperties
Dictionary pProperties
 Properties. More...
 

Protected Member Functions

void loadAndAddPersistableElementsOld (Console console, PersistencyEnvironment env, FileReader reader)
 

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.

◆ getNavigationSpaceCount()

int Dragengine.Preloading.StubGameWorld.getNavigationSpaceCount ( )

Number of navigation spaces.

◆ getWorldDecalAt()

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

World decal stub at index.

◆ loadAndAddPersistableElementsOld()

void Dragengine.Preloading.StubGameWorld.loadAndAddPersistableElementsOld ( Console  console,
PersistencyEnvironment  env,
FileReader  reader 
)
protected

◆ 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.

◆ preloadElementResources()

void Dragengine.Preloading.StubGameWorld.preloadElementResources ( )

Preload element resources.

◆ 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.

Member Data Documentation

◆ pCounter

PreloadCounter Dragengine.Preloading.StubGameWorld.pCounter

◆ pElements

Array Dragengine.Preloading.StubGameWorld.pElements

◆ pGameWorld

GameWorld Dragengine.Preloading.StubGameWorld.pGameWorld

◆ pNavSpaces

Array Dragengine.Preloading.StubGameWorld.pNavSpaces

◆ pNewElementsRange

UniqueIDRemapper.RemapEntry Dragengine.Preloading.StubGameWorld.pNewElementsRange

◆ pNextObjectID

UniqueID Dragengine.Preloading.StubGameWorld.pNextObjectID

◆ pWorldDecals

Array Dragengine.Preloading.StubGameWorld.pWorldDecals

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