Drag[en]gine Script Module DragonScript Script API  1.0
TemporaryDecalManager Class Reference
Inheritance diagram for TemporaryDecalManager:

Public Member Functions

void addDecal (TemporaryDecal decal)
TemporaryDecal getDecalAt (int index)
int getDecalCount ()
float getElapsedTime ()
float getUpdateInterval ()
TemporaryDecalManager new ()
void removeAllDecals ()
void removeDecal (TemporaryDecal decal)
void setElapsedTime (float seconds)
void setUpdateInterval (float seconds)
void update (float elapsed)

Detailed Description

Manages a list of temporary decals. Typical temporary decals are weapon damages. To avoid hogging memory and loosing speed these temporary decals only stay alive for a given amount of time before they are removed. The manager provides the default behavoir to delete decals once their time to live reach 0 or below. The check is not done every update to avoid eating cpu time. The update interval indicates after how many seconds a test is carried out. This avoids wasting cpu time for checking decal times since usually a precise timing there is not required. Set this to 0 if you need full precision.

Member Function Documentation

§ addDecal()

void addDecal ( TemporaryDecal  decal)

Adds a decal.

§ getDecalAt()

TemporaryDecal getDecalAt ( int  index)

Retrieves the decal at the given index.

§ getDecalCount()

int getDecalCount ( )

Retrieves the number of decals.

§ getElapsedTime()

float getElapsedTime ( )

Retrieves the elapsed time in seconds.

§ getUpdateInterval()

float getUpdateInterval ( )

Retrieves the update interval in seconds.

§ new()

Creates a new TemporaryDecalManager Object.

§ removeAllDecals()

void removeAllDecals ( )

Removes all decals.

§ removeDecal()

void removeDecal ( TemporaryDecal  decal)

Removes a decal.

§ setElapsedTime()

void setElapsedTime ( float  seconds)

Sets the elapsed time in seconds.

§ setUpdateInterval()

void setUpdateInterval ( float  seconds)

Sets the update interval in seconds.

§ update()

void update ( float  elapsed)

Updates the decals. Reduces the time to live of all decals by the given amount of seconds and removes decals if their time to live drops below zero.

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