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

Base world class. More...

Inheritance diagram for Dragengine.Scenery.BaseWorldClass:
Dragengine.Scenery.BehaviorElementClass Dragengine.Scenery.ElementClass Dragengine.ResourceListener

Public Member Functions

ElementClass duplicateNamed (String classname)
 Create duplicate of class with new name.
 
ECBehaviorWorld getWorld ()
 World behavior.
 
BaseWorldClass new ()
 Create element class using BaseGameApp parameters.
 
BaseWorldClass new (Loaders loaders, MutableID idGenerator)
 Create element class.
 
BaseWorldClass new (String className)
 Create element class using loaders from BaseGameApp.
 
BaseWorldClass new (String className, Loaders loaders, MutableID idGenerator)
 Create element class.
 
- Public Member Functions inherited from Dragengine.Scenery.BehaviorElementClass
void addAttachableBehaviorFactories ()
 Add attachable behavior factories supported by this element class.
 
void addAttachableBehaviorFactories (AttachableBehaviorFactoryList factories)
 Add attachable behavior factories replacing duplicates if present.
 
void addAttachableBehaviorFactory (AttachableBehaviorFactory factory)
 Add attachable behavior factory replacing duplicate if present.
 
void addBehavior (ECBehavior behavior)
 Add behavior.
 
void addBehaviorFactories (BehaviorFactoryList factories)
 Add behavior factories replacing duplicates if present.
 
void addDefaultAttachableBehaviorFactories ()
 Add all attachable behavior factories present in the DragonScript module.
 
void addDefaultBehaviorFactories ()
 Add all behavior factories present in the DragonScript module.
 
void addXmlBehaviorInfo (BehaviorFactory factory, String id, Dictionary parameters)
 Add XML behavior information required for XML-XML subclassing.
 
Array collectBehaviors (Block ablock)
 Collect behaviors with block into Array.
 
void createAndAddElement (StubElement stub, GameWorld gameWorld)
 Create element from given stub and add it to game world.
 
void dispose ()
 Dispose of element class.
 
ECBehavior findBehavior (Block ablock)
 Find behavior with block.
 
void forEachAttachableBehaviorFactory (Block ablock)
 Visit attachable behavior factories.
 
void forEachBehavior (Block ablock)
 Visit behaviors with block.
 
void forEachBehaviorDirect (Block ablock)
 Visit behaviors with block.
 
void forEachBehaviorFactory (Block ablock)
 Visit behavior factories.
 
void forEachPrepareStubBehavior (Block ablock)
 Visit prepare stub behaviors with block. version 1.23.
 
void forEachPreventCreationBehavior (Block ablock)
 Visit prevent creation behaviors with block. version 1.23.
 
void forEachXmlBehaviorInfo (Block ablock)
 Visit XML behavior info with block with argument XmlBehaviorInfo.
 
AttachableBehaviorFactory getAttachableBehaviorFactoryWithId (String id)
 Attachable behavior factory with identifier or null if absent.
 
ECBehavior getBehaviorAt (int index)
 Behavior at index.
 
BehaviorFactory getBehaviorFactoryWithId (String id)
 Behavior factory with identifier or null if absent.
 
ECBehavior getBehaviorWithId (String id)
 Behavior with matching BehaviorCompatiblePersistency::getBehaviorID() or null.
 
BehaviorElementClass new (Loaders loaders)
 Create element class.
 
BehaviorElementClass new (String className, Loaders loaders)
 Create element class.
 
void prepareStubs (StubElement stub, GameWorld gameWorld, bool loading)
 Call prepareStub on all prepare stub behaviors.
 
bool preventCreation (StubElement stub, GameWorld gameWorld)
 Call prepareStub on all prepare stub behaviors.
 
void removeAllAttachableBehaviorFactories ()
 Remove all attachable behavior factories.
 
void removeAllBehaviorFactories ()
 Remove all behavior factories.
 
- Public Member Functions inherited from Dragengine.Scenery.ElementClass
void addProperty (ElementClassProperty property)
 Add property.
 
void copyPropertyValues (ElementClass eclass)
 Copy values of properties from another class to properties of this class.
 
Element createElement (StubElement stub)
 Create element instance from stub.
 
bool equals (Object obj)
 Element class is equal to another object.
 
void failedLoading (String path, ResourceLoaderType resourceType)
 Resource failed loading.
 
void finishedLoading (String path, ResourceLoaderType resourceType, Object resource)
 Resource finished loading successfully.
 
void forEachProperty (Block ablock)
 Visit properties with block with parameter ElementClass.
 
String getBasePath ()
 Base path for relative loading of resource properties.
 
CodecPropertyString getCodecPropertyString ()
 Property codec helper.
 
bool getIsXmlElementClass ()
 Element class is an XML element class.
 
bool getPersistable ()
 Element class is persistable to file writers.
 
int getPropertyCount ()
 Number of properties.
 
ElementClassProperty getPropertyNamed (String name)
 Named property or null if absent.
 
Array getPropertyNames ()
 List of property names as array of strings.
 
TSTriggerExpressionParser getTriggerExpressionParser ()
 Trigger expression parser.
 
int hashCode ()
 Hash code.
 
bool hasPropertyNamed (String name)
 Named property is present.
 
Object injectProperty (Object injectValue, Block ablock)
 Process value visiting properties.
 
void loadAndAddElement (PersistencyEnvironment env, StubElement stub, FileReader reader, GameWorld gameWorld)
 Load element from file reader and add it to game world.
 
Element loadElement (PersistencyEnvironment env, StubElement stub, FileReader reader)
 Load element from file reader.
 
void removeAllProperties ()
 Remove all properties.
 
void removeProperty (ElementClassProperty property)
 Remove property.
 
void setBasePath (String path)
 Set base path for relative loading of resource properties.
 
void setIsXmlElementClass (bool isXmlElementClass)
 Set if element class is an XML element class.
 
void setPersistable (bool persistable)
 Set element class is persistable to file writers.
 
void setPropertyValue (String name, Object value)
 Set value of named property.
 
Notification

Public Attributes

ECBehaviorWorld pWorld
 
- Public Attributes inherited from Dragengine.Scenery.BehaviorElementClass
Dictionary pBehaviorFactories
 
Dictionary pBehaviorIdMap
 
Array pBehaviors
 
Array pXmlBehaviorsInfo
 

Protected Member Functions

Element createElement ()
 Create element instance.
 

Additional Inherited Members

- Static Public Member Functions inherited from Dragengine.Scenery.ElementClass
static CodecPropertyString getSharedCodecPropertyString ()
 Shared property codec helper.
 
static TSTriggerExpressionParser getSharedTriggerExpressionParser ()
 Shared trigger expression parser.
 
static void setSharedCodecPropertyString (CodecPropertyString codec)
 Set shared property codec helper.
 
static void setSharedTriggerExpressionParser (TSTriggerExpressionParser parser)
 Set shared trigger expression parser.
 
- Static Public Attributes inherited from Dragengine.Scenery.BehaviorElementClass
static BehaviorFactoryHelper sharedFactoryHelper = BehaviorFactoryHelper.new()
 

Detailed Description

Base world class.

Version
1.26

Contains ECBehaviorWorld to load a world file.

This class is a quick way to load a world file (*.deworld) adding its content to the game world.

Member Function Documentation

◆ createElement()

Element Dragengine.Scenery.BaseWorldClass.createElement ( )
protected

Create element instance.

Reimplemented from Dragengine.Scenery.BehaviorElementClass.

◆ duplicateNamed()

ElementClass Dragengine.Scenery.BaseWorldClass.duplicateNamed ( String  classname)

Create duplicate of class with new name.

This is used for creating element classes using XML element class loading. If this class does not support XML subclassing return null.

The default implementation returns null.

Reimplemented from Dragengine.Scenery.ElementClass.

◆ getWorld()

ECBehaviorWorld Dragengine.Scenery.BaseWorldClass.getWorld ( )

World behavior.

◆ new() [1/4]

BaseWorldClass Dragengine.Scenery.BaseWorldClass.new ( )

Create element class using BaseGameApp parameters.

Reimplemented from Dragengine.Scenery.BehaviorElementClass.

◆ new() [2/4]

BaseWorldClass Dragengine.Scenery.BaseWorldClass.new ( Loaders  loaders,
MutableID  idGenerator 
)

Create element class.

◆ new() [3/4]

BaseWorldClass Dragengine.Scenery.BaseWorldClass.new ( String  className)

Create element class using loaders from BaseGameApp.

Reimplemented from Dragengine.Scenery.BehaviorElementClass.

◆ new() [4/4]

BaseWorldClass Dragengine.Scenery.BaseWorldClass.new ( String  className,
Loaders  loaders,
MutableID  idGenerator 
)

Create element class.

Member Data Documentation

◆ pWorld

ECBehaviorWorld Dragengine.Scenery.BaseWorldClass.pWorld

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