Drag[en]gine Script Module DragonScript
1.23
|
Stub for constructing game world. More...
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) |
Stub for constructing game world.
Supports preloading resources in the background as well as game world creation.
void Dragengine.Preloading.StubGameWorld.addElement | ( | StubElement | element | ) |
Add element stub.
void Dragengine.Preloading.StubGameWorld.addElementClassesTo | ( | PreloadManager | preloadManager | ) |
Add all element classes to the preload manager.
void Dragengine.Preloading.StubGameWorld.addNavigationSpace | ( | NavigationSpace | navspace | ) |
Add navigation space.
void Dragengine.Preloading.StubGameWorld.addWorldDecal | ( | StubWorldDecal | worldDecal | ) |
Add world decal stub.
void Dragengine.Preloading.StubGameWorld.beginPreloading | ( | ) |
Begin preloading resources.
void Dragengine.Preloading.StubGameWorld.createAndAddElements | ( | Console | console | ) |
Create and add all elements.
Call for newly create game worlds. For loading game worlds use:
void Dragengine.Preloading.StubGameWorld.forEachElement | ( | Block | ablock | ) |
Visit element stubs using block with StubElement as parameter.
void Dragengine.Preloading.StubGameWorld.forEachWorldDecal | ( | Block | ablock | ) |
Visit world decal stubs using block with StubWorldDecal as parameter.
StubElement Dragengine.Preloading.StubGameWorld.getElementAt | ( | int | index | ) |
Element stub at index.
NavigationSpace Dragengine.Preloading.StubGameWorld.getNavigationSpaceAt | ( | int | index | ) |
Navigation space at index.
int Dragengine.Preloading.StubGameWorld.getNavigationSpaceCount | ( | ) |
Number of navigation spaces.
StubWorldDecal Dragengine.Preloading.StubGameWorld.getWorldDecalAt | ( | int | index | ) |
World decal stub at index.
|
protected |
void Dragengine.Preloading.StubGameWorld.loadResources | ( | ) |
Loading resources.
StubGameWorld Dragengine.Preloading.StubGameWorld.new | ( | GameWorld | gameWorld, |
PreloadCounter | parentCounter | ||
) |
Create stub.
StubGameWorld Dragengine.Preloading.StubGameWorld.new | ( | StubGameWorld | stub | ) |
Create copy of stub.
void Dragengine.Preloading.StubGameWorld.preloadElementResources | ( | ) |
Preload element resources.
void Dragengine.Preloading.StubGameWorld.preloadWorldDecalResources | ( | ) |
Preload world decal resources.
void Dragengine.Preloading.StubGameWorld.remapObjectIDs | ( | UniqueIDRemapper | remapper | ) |
Remap object IDs.
void Dragengine.Preloading.StubGameWorld.removeAllElements | ( | ) |
Remove all elements.
void Dragengine.Preloading.StubGameWorld.removeAllNavigationSpaces | ( | ) |
Remove all navigation spaces.
void Dragengine.Preloading.StubGameWorld.setNewElementsRange | ( | UniqueIDRemapper.RemapEntry | range | ) |
Set range of new elements added since the last saving or null.
void Dragengine.Preloading.StubGameWorld.setNextObjectID | ( | UniqueID | nextObjectID | ) |
Set next object ID.
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.
bool Dragengine.Preloading.StubGameWorld.verifyPreloading | ( | Console | console | ) |
Verify if resources failed preloading printing problems to console.
void Dragengine.Preloading.StubGameWorld.worldAddNavigationSpaces | ( | ) |
Add navigation spaces to world.
PreloadCounter Dragengine.Preloading.StubGameWorld.pCounter |
Array Dragengine.Preloading.StubGameWorld.pElements |
GameWorld Dragengine.Preloading.StubGameWorld.pGameWorld |
Array Dragengine.Preloading.StubGameWorld.pNavSpaces |
UniqueIDRemapper.RemapEntry Dragengine.Preloading.StubGameWorld.pNewElementsRange |
UniqueID Dragengine.Preloading.StubGameWorld.pNextObjectID |
Array Dragengine.Preloading.StubGameWorld.pWorldDecals |