Drag[en]gine Script Module DragonScript Script API  1.0
SimpleElementClass Class Referenceabstract
Inheritance diagram for SimpleElementClass:
ElementClass ResourceNotifier IMMPropClass IMMEnvironmentMapClass IMMHotSpotClass IMMLightClass IMMParticleEmitterClass IMMSpeakerClass IMMTriggerTimerClass

Public Member Functions

ECPAnimation getAnimation ()
 Animation resource. More...
 
ECPModel getModel ()
 Model resource. More...
 
ECPOcclusionMesh getOcclusionMesh ()
 Occlusion mesh resource. More...
 
ECPRig getRig ()
 Rig resource. More...
 
ECPSkin getSkin ()
 Skin resource. More...
 
SimpleElementClass new (String className)
 
- Public Member Functions inherited from ElementClass
void addDependencies (PreloadManager preloadManager)
 
void addProperty (ElementClassProperty property)
 Add property. More...
 
void createAndAddElement (StubElement stub, GameWorld gameWorld)
 Create element from given stub and add it to game world. More...
 
Element createElement (StubElement stub)
 Create element instance from stub. More...
 
void dispose ()
 Dispose of element class. More...
 
ElementClass duplicateNamed (String classname)
 Create duplicate of class with new name. More...
 
bool equals (Object obj)
 Element class is equal to another object. More...
 
void failedLoading (String path, int resourceType)
 Resource failed loading. More...
 
void finishedLoading (String path, int resourceType, Object resource)
 Resource finished loading successfully. More...
 
void forEachProperty (Block ablock)
 Visit properties with block with parameter ElementClass. More...
 
String getClassname ()
 Cclass name. More...
 
CodecPropertyString getCodecPropertyString ()
 Property codec helper. More...
 
bool getPersistable ()
 Element class is persistable to file writers. More...
 
int getPropertyCount ()
 Number of properties. More...
 
ElementClassProperty getPropertyNamed (String name)
 Named property or null if absent. More...
 
Array getPropertyNames ()
 List of property names as array of strings. More...
 
TSTriggerExpressionParser getTriggerExpressionParser ()
 Trigger expression parser. More...
 
int hashCode ()
 Hash code. More...
 
bool hasPropertyNamed (String name)
 Named property is present. More...
 
void loadAndAddElement (PersistencyEnvironment env, StubElement stub, FileReader reader, GameWorld gameWorld)
 Load element from file reader and add it to game world. More...
 
Element loadElement (PersistencyEnvironment env, StubElement stub, FileReader reader)
 Load element from file reader. More...
 
ElementClass new (String className)
 Create element class. More...
 
void preloadResources (PreloadCounter counter)
 Preload resources. More...
 
void removeAllProperties ()
 Remove all properties. More...
 
void removeProperty (ElementClassProperty property)
 Remove property. More...
 
void setPersistable (bool persistable)
 Set element class is persistable to file writers. More...
 
Notification

Protected Member Functions

Element createElement ()
 Create element instance. More...
 
- Protected Member Functions inherited from ElementClass
Element createElement ()
 Create element instance. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from ElementClass
static CodecPropertyString getSharedCodecPropertyString ()
 Shared property codec helper. More...
 
static TSTriggerExpressionParser getSharedTriggerExpressionParser ()
 Shared trigger expression parser. More...
 
static void setSharedCodecPropertyString (CodecPropertyString codec)
 Set shared property codec helper. More...
 
static void setSharedTriggerExpressionParser (TSTriggerExpressionParser parser)
 Set shared trigger expression parser. More...
 

Detailed Description

Base element class for SimpleElement based classes. Provides support for preloading a model, skin, rig and animation. For each resource the path is stored as a string alongside the resource itself. A null string indicates an unused resource in which case this resource is not preloaded. Furthermore a default stub initialization routine is provided which sets the position, orientation and some common properties.

Author
Roland Pl├╝ss
Version
1.0

Member Function Documentation

◆ createElement()

Element createElement ( )
protected

Create element instance.

If this element class does not support creating elements, for example because the result is not an element, null has to be returned. The default implementation returns null. Subclasses not intending to create elements or requiring special creation handling should subclass createAndAddElement() and loadAndAddElement() bypassing this method.

◆ getAnimation()

ECPAnimation getAnimation ( )

Animation resource.

◆ getModel()

ECPModel getModel ( )

Model resource.

◆ getOcclusionMesh()

ECPOcclusionMesh getOcclusionMesh ( )

Occlusion mesh resource.

◆ getRig()

ECPRig getRig ( )

Rig resource.

◆ getSkin()

ECPSkin getSkin ( )

Skin resource.

◆ new()

SimpleElementClass new ( String  className)

Creates a new SimpleElementClass object.


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