Drag[en]gine Script Module DragonScript
1.23
|
Manage list of temporary decals. More...
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... | |
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.
void Dragengine.Scenery.TemporaryDecalManager.add | ( | TemporaryDecal | decal | ) |
Add decal.
TemporaryDecal Dragengine.Scenery.TemporaryDecalManager.getAt | ( | int | index | ) |
Decal at index.
int Dragengine.Scenery.TemporaryDecalManager.getCount | ( | ) |
Count of decals.
float Dragengine.Scenery.TemporaryDecalManager.getElapsedTime | ( | ) |
Elapsed time in seconds.
float Dragengine.Scenery.TemporaryDecalManager.getUpdateInterval | ( | ) |
Update interval in seconds.
TemporaryDecalManager Dragengine.Scenery.TemporaryDecalManager.new | ( | ) |
Create temorary decal manager.
void Dragengine.Scenery.TemporaryDecalManager.remove | ( | TemporaryDecal | decal | ) |
Remove decal.
void Dragengine.Scenery.TemporaryDecalManager.removeAll | ( | ) |
Remove all decals.
void Dragengine.Scenery.TemporaryDecalManager.setElapsedTime | ( | float | seconds | ) |
Set elapsed time in seconds.
void Dragengine.Scenery.TemporaryDecalManager.setUpdateInterval | ( | float | seconds | ) |
Set update interval in seconds.
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.