Drag[en]gine Script Module DragonScript 1.35
Loading...
Searching...
No Matches
Dragengine.Scenery.ECPWorld Class Reference

World stub element class property for use with XML loading. More...

Inheritance diagram for Dragengine.Scenery.ECPWorld:
Dragengine.Scenery.ElementClassProperty

Public Member Functions

void copyValue (ElementClass elementClass, ElementClassProperty property)
void dispose ()
 Dispose of element class property to break reference loops.
bool getHasPreloaded ()
 Property has been preloaded.
LoadWorld getLoader ()
 World loader.
String getPath ()
 Path to world.
StubGameWorld getWorldStub ()
 World stub or null if not present.
StubGameWorld getWorldStub (StubWithProperties stub, ElementClass eclass)
 World stub modified by stub property if present.
bool logPreloadProblems (ElementClass elementClass, Console console)
 Log preloading problems.
ECPWorld new (String name, LoadWorld loader)
 Create property.
ECPWorld new (String name, LoadWorld loader, String path)
 Create property with initial path.
void preloadResources (ElementClass elementClass, PreloadCounter counter)
 Preload resources if supported.
void setPath (String path)
 Set path to world.
void setValue (Object value)
 Set value of property from XML decoded value.
void setWorldStub (StubGameWorld stub)
 Set world stub or null if not present.
Public Member Functions inherited from Dragengine.Scenery.ElementClassProperty
String getName ()
 Name.
ElementClassProperty new (String name)
 Create property.

Public Attributes

bool pHasPreloaded
LoadWorld pLoader
String pPath
StubGameWorld pWorldStub

Detailed Description

World stub element class property for use with XML loading.

World stub is set from XML using a path. Loads the world stub during preloading. The value of the property is then the loaded StubGameWorld. If loading fails null is stored.

Warning
The returned StubGameWorld is shared. Do not modify it directly. Instead create a copy of the stub and all its content before using it.

Member Function Documentation

◆ copyValue()

void Dragengine.Scenery.ECPWorld.copyValue ( ElementClass elementClass,
ElementClassProperty property )

Referenced by getWorldStub().

◆ dispose()

void Dragengine.Scenery.ECPWorld.dispose ( )

Dispose of element class property to break reference loops.

Reimplemented from Dragengine.Scenery.ElementClassProperty.

References pLoader, and pPath.

Referenced by getLoader(), and getPath().

◆ getHasPreloaded()

bool Dragengine.Scenery.ECPWorld.getHasPreloaded ( )

Property has been preloaded.

Referenced by logPreloadProblems().

◆ getLoader()

LoadWorld Dragengine.Scenery.ECPWorld.getLoader ( )

World loader.

References dispose(), pLoader, and pWorldStub.

Referenced by setPath().

◆ getPath()

String Dragengine.Scenery.ECPWorld.getPath ( )

Path to world.

References dispose().

Referenced by getWorldStub(), and setWorldStub().

◆ getWorldStub() [1/2]

StubGameWorld Dragengine.Scenery.ECPWorld.getWorldStub ( )

World stub or null if not present.

References pLoader.

Referenced by getWorldStub(), and preloadResources().

◆ getWorldStub() [2/2]

StubGameWorld Dragengine.Scenery.ECPWorld.getWorldStub ( StubWithProperties stub,
ElementClass eclass )

World stub modified by stub property if present.

If named stub property is not present or empty string the stored world stub is returned. If the named stub property is present it is loaded as world stub.

Warning
The returned StubGameWorld is shared. Do not modify it directly. Instead create a copy of the stub and all its content before using it.

References copyValue(), getPath(), getWorldStub(), logPreloadProblems(), new(), pHasPreloaded, pLoader, pPath, preloadResources(), pWorldStub, and setValue().

◆ logPreloadProblems()

bool Dragengine.Scenery.ECPWorld.logPreloadProblems ( ElementClass elementClass,
Console console )

Log preloading problems.

Returns
True if problems are present.

Reimplemented from Dragengine.Scenery.ElementClassProperty.

References getHasPreloaded(), pHasPreloaded, pWorldStub, and setWorldStub().

Referenced by getWorldStub().

◆ new() [1/2]

ECPWorld Dragengine.Scenery.ECPWorld.new ( String name,
LoadWorld loader )

Create property.

References new().

Referenced by getWorldStub(), new(), and new().

◆ new() [2/2]

ECPWorld Dragengine.Scenery.ECPWorld.new ( String name,
LoadWorld loader,
String path )

Create property with initial path.

References new().

◆ preloadResources()

void Dragengine.Scenery.ECPWorld.preloadResources ( ElementClass elementClass,
PreloadCounter counter )

Preload resources if supported.

Reimplemented from Dragengine.Scenery.ElementClassProperty.

References getWorldStub(), and pWorldStub.

Referenced by getWorldStub().

◆ setPath()

void Dragengine.Scenery.ECPWorld.setPath ( String path)

Set path to world.

References getLoader().

Referenced by setValue().

◆ setValue()

void Dragengine.Scenery.ECPWorld.setValue ( Object value)

Set value of property from XML decoded value.

Reimplemented from Dragengine.Scenery.ElementClassProperty.

References pPath, and setPath().

Referenced by getWorldStub().

◆ setWorldStub()

void Dragengine.Scenery.ECPWorld.setWorldStub ( StubGameWorld stub)

Set world stub or null if not present.

References getPath(), and pPath.

Referenced by logPreloadProblems().

Member Data Documentation

◆ pHasPreloaded

bool Dragengine.Scenery.ECPWorld.pHasPreloaded

Referenced by getWorldStub(), and logPreloadProblems().

◆ pLoader

LoadWorld Dragengine.Scenery.ECPWorld.pLoader

◆ pPath

String Dragengine.Scenery.ECPWorld.pPath

◆ pWorldStub

StubGameWorld Dragengine.Scenery.ECPWorld.pWorldStub

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