Drag[en]gine Script Module DragonScript Script API  1.0
StubElement Class Reference

Stub for an element. More...

Inheritance diagram for StubElement:
StubWithProperties

Public Member Functions

void addTexture (StubElementTexture texture)
 Add texture. More...
 
void createAndAddElement (GameWorld gameWorld)
 Create element and adds it to the game world. More...
 
Element createElement ()
 Create element. More...
 
void forEachTexture (Block ablock)
 Visit textures with a block. More...
 
ElementClass getClass ()
 Element class. More...
 
int getID ()
 ID used for attaching during post load. More...
 
DVector getPosition ()
 Position. More...
 
Vector getRotation ()
 Rotation. More...
 
Vector getScaling ()
 Scaling if sizable. More...
 
StubElementTexture getTextureAt (int index)
 Texture at index. More...
 
int getTextureCount ()
 Number of textures. More...
 
StubElement new (ElementClass aClass)
 Create element stub. More...
 
void setCounter (PreloadCounter counter)
 Set counter. More...
 
void setID (int id)
 Set ID used for attaching during post load. More...
 
void setPosition (DVector position)
 Set position. More...
 
void setRotation (Vector rotation)
 Set rotation. More...
 
void setScaling (Vector scaling)
 Set scaling if sizable. More...
 
bool verifyPreloading (Console console)
 Verify if a resource failed preloading and print the problems to the console. More...
 
- Public Member Functions inherited from StubWithProperties
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...
 
void setPropertyValueFor (String key, String value)
 Set property. More...
 

Detailed Description

Stub for an element.

Used during asynchronous loading to hold the settings of an element until all resources have been loaded.

Author
Roland Pl├╝ss
Version
1.0

Member Function Documentation

§ addTexture()

void addTexture ( StubElementTexture  texture)

Add texture.

§ createAndAddElement()

void createAndAddElement ( GameWorld  gameWorld)

Create element and adds it to the game world.

§ createElement()

Element createElement ( )

Create element.

§ forEachTexture()

void forEachTexture ( Block  ablock)

Visit textures with a block.

§ getClass()

ElementClass getClass ( )

Element class.

§ getID()

int getID ( )

ID used for attaching during post load.

§ getPosition()

DVector getPosition ( )

Position.

§ getRotation()

Vector getRotation ( )

Rotation.

§ getScaling()

Vector getScaling ( )

Scaling if sizable.

§ getTextureAt()

StubElementTexture getTextureAt ( int  index)

Texture at index.

§ getTextureCount()

int getTextureCount ( )

Number of textures.

§ new()

StubElement new ( ElementClass  aClass)

Create element stub.

§ setCounter()

void setCounter ( PreloadCounter  counter)

Set counter.

§ setID()

void setID ( int  id)

Set ID used for attaching during post load.

§ setPosition()

void setPosition ( DVector  position)

Set position.

§ setRotation()

void setRotation ( Vector  rotation)

Set rotation.

§ setScaling()

void setScaling ( Vector  scaling)

Set scaling if sizable.

§ verifyPreloading()

bool verifyPreloading ( Console  console)

Verify if a resource failed preloading and print the problems to the console.

Returns
true if all resources loaded successfully.

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