Drag[en]gine Script Module DragonScript 1.35
Loading...
Searching...
No Matches
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.
TemporaryDecal getAt (int index)
 Decal at index.
int getCount ()
 Count of decals.
float getElapsedTime ()
 Elapsed time in seconds.
float getUpdateInterval ()
 Update interval in seconds.
TemporaryDecalManager new ()
 Create temorary decal manager.
void remove (TemporaryDecal decal)
 Remove decal.
void removeAll ()
 Remove all decals.
void setElapsedTime (float seconds)
 Set elapsed time in seconds.
void setUpdateInterval (float seconds)
 Set update interval in seconds.
void update (float elapsed)
 Update decals.

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.

Referenced by update().

◆ getAt()

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

Decal at index.

References setElapsedTime().

Referenced by removeAll().

◆ getCount()

int Dragengine.Scenery.TemporaryDecalManager.getCount ( )

Count of decals.

References getElapsedTime().

Referenced by removeAll().

◆ getElapsedTime()

float Dragengine.Scenery.TemporaryDecalManager.getElapsedTime ( )

Elapsed time in seconds.

Referenced by getCount().

◆ getUpdateInterval()

float Dragengine.Scenery.TemporaryDecalManager.getUpdateInterval ( )

Update interval in seconds.

Referenced by setUpdateInterval().

◆ new()

TemporaryDecalManager Dragengine.Scenery.TemporaryDecalManager.new ( )

Create temorary decal manager.

References new().

Referenced by new().

◆ remove()

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

Remove decal.

◆ removeAll()

void Dragengine.Scenery.TemporaryDecalManager.removeAll ( )

Remove all decals.

References getAt(), and getCount().

Referenced by update().

◆ setElapsedTime()

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

Set elapsed time in seconds.

References setUpdateInterval().

Referenced by getAt().

◆ setUpdateInterval()

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

Set update interval in seconds.

References getUpdateInterval().

Referenced by setElapsedTime().

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

References add(), removeAll(), and update().

Referenced by update().


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