Drag[en]gine Script Module DragonScript Script API  1.0
SimpleElementClass Class Referenceabstract
Inheritance diagram for SimpleElementClass:
ElementClass ResourceNotifier

Public Member Functions

Element createElement (StubElement stub)
 
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...
 
void loadAndAddElement (FileReader reader, GameWorld gameWorld)
 
Element loadElement (FileReader reader)
 
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)
 
Element createElement (StubElement stub)
 
void dispose ()
 
ElementClass duplicateNamed (String classname)
 
bool equals (Object obj)
 
void failedLoading (String path, int resourceType)
 
void finishedLoading (String path, int resourceType, Object resource)
 
void forEachProperty (Block ablock)
 Visit properties with block with parameter ElementClass. More...
 
String getClassname ()
 
bool getLoadIfNetGameClient ()
 
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...
 
int hashCode ()
 
bool hasPropertyNamed (String name)
 Named property is present. More...
 
void loadAndAddElement (FileReader reader, GameWorld gameWorld)
 
Element loadElement (FileReader reader)
 
ElementClass new (String className)
 
void preloadResources ()
 
void setLoadIfNetGameClient (bool loadIfNetGameClient)
 
Notification

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 ( StubElement  stub)

Creates a simple element from the given stub.

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

§ loadAndAddElement()

void loadAndAddElement ( FileReader  reader,
GameWorld  gameWorld 
)

Loads an element using a file reader and adds it to the game world. For the Prop class a modification is required to add all attached objects if there are any after the object has been added to the world.

§ loadElement()

Element loadElement ( FileReader  reader)

Loads an element using a file reader and returns it. If this class does not support loading elements (because for example the result is not an element) null has to be returned.

§ new()

SimpleElementClass new ( String  className)

Creates a new SimpleElementClass object.


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