|
Drag[en]gine Script Module DragonScript 1.35
|
Manage list of temporary decals. More...
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. | |
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.
Referenced by update().
| TemporaryDecal Dragengine.Scenery.TemporaryDecalManager.getAt | ( | int | index | ) |
| int Dragengine.Scenery.TemporaryDecalManager.getCount | ( | ) |
| float Dragengine.Scenery.TemporaryDecalManager.getElapsedTime | ( | ) |
Elapsed time in seconds.
Referenced by getCount().
| float Dragengine.Scenery.TemporaryDecalManager.getUpdateInterval | ( | ) |
Update interval in seconds.
Referenced by setUpdateInterval().
| TemporaryDecalManager Dragengine.Scenery.TemporaryDecalManager.new | ( | ) |
| void Dragengine.Scenery.TemporaryDecalManager.remove | ( | TemporaryDecal | decal | ) |
Remove decal.
| void Dragengine.Scenery.TemporaryDecalManager.removeAll | ( | ) |
| void Dragengine.Scenery.TemporaryDecalManager.setElapsedTime | ( | float | seconds | ) |
| void Dragengine.Scenery.TemporaryDecalManager.setUpdateInterval | ( | float | 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.
References add(), removeAll(), and update().
Referenced by update().