Drag[en]gine Script Module DragonScript  1.23
Dragengine.Scenery.TemporaryDecalManager Class Reference

Manage list of temporary decals. More...

Inheritance diagram for Dragengine.Scenery.TemporaryDecalManager:

Public Member Functions

void add (TemporaryDecal decal)
 Add decal. More...
 
TemporaryDecal getAt (int index)
 Decal at index. More...
 
int getCount ()
 Count of decals. More...
 
float getElapsedTime ()
 Elapsed time in seconds. More...
 
float getUpdateInterval ()
 Update interval in seconds. More...
 
TemporaryDecalManager new ()
 Create temorary decal manager. More...
 
void remove (TemporaryDecal decal)
 Remove decal. More...
 
void removeAll ()
 Remove all decals. More...
 
void setElapsedTime (float seconds)
 Set elapsed time in seconds. More...
 
void setUpdateInterval (float seconds)
 Set update interval in seconds. More...
 
void update (float elapsed)
 Update decals. More...
 

Detailed Description

Manage 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

◆ add()

void Dragengine.Scenery.TemporaryDecalManager.add ( TemporaryDecal  decal)

Add decal.

◆ getAt()

TemporaryDecal Dragengine.Scenery.TemporaryDecalManager.getAt ( int  index)

Decal at index.

◆ getCount()

int Dragengine.Scenery.TemporaryDecalManager.getCount ( )

Count of decals.

◆ getElapsedTime()

float Dragengine.Scenery.TemporaryDecalManager.getElapsedTime ( )

Elapsed time in seconds.

◆ getUpdateInterval()

float Dragengine.Scenery.TemporaryDecalManager.getUpdateInterval ( )

Update interval in seconds.

◆ new()

TemporaryDecalManager Dragengine.Scenery.TemporaryDecalManager.new ( )

Create temorary decal manager.

◆ remove()

void Dragengine.Scenery.TemporaryDecalManager.remove ( TemporaryDecal  decal)

Remove decal.

◆ removeAll()

void Dragengine.Scenery.TemporaryDecalManager.removeAll ( )

Remove all decals.

◆ setElapsedTime()

void Dragengine.Scenery.TemporaryDecalManager.setElapsedTime ( float  seconds)

Set elapsed time in seconds.

◆ setUpdateInterval()

void Dragengine.Scenery.TemporaryDecalManager.setUpdateInterval ( float  seconds)

Set update interval in seconds.

◆ update()

void Dragengine.Scenery.TemporaryDecalManager.update ( float  elapsed)

Update 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: