|
resonance 1.0.1
|
Burst of generated instances that sweeps along a short stretch of the tunnel. More...
#include <tnlbumpfx.h>
Public Member Functions | |
| TnlBumpFX (int nIndex) | |
| Resolve the objects of one burst slot and silence its generator. | |
| ~TnlBumpFX () | |
| Give the generator back both rate bounds at the recorded low rate. | |
| void | Start (int nStep, const HxStr &colorName, int nForward, float flPathOffset) |
| Start a burst that sweeps towards one lane in one player's colour. | |
| bool | IsIdle () const |
| Report whether the burst waits for Start(). | |
| void | SetFrame (float flFrame) |
| Advance the burst. | |
Burst of generated instances that sweeps along a short stretch of the tunnel.
The class is not polymorphic and emits no RTTI, and no allocation tag or file path identifies it. The name is inferred from the three objects it drives, "bumpfx<n>.mgen", "bumpfx<n>.mat", and "bumpfx<n>.tnm".
A burst runs in two timed phases once it is started. For the first 500 frames the generator spawns with its authored rate while its path window follows the song, 800 frames long and running forward or backward. The spawn rate then drops to one instance per 1e9 frames, and 1500 frames after the start the generator hides.
AppTunnel allocates these in a loop, 0x20 bytes each, with the loop index as nIndex.
|
explicit |
Resolve the objects of one burst slot and silence its generator.
The generator's low spawn rate is recorded before both rate bounds are set to 1e9, and the generator is hidden.
| nIndex | The burst slot. |
| TnlBumpFX::~TnlBumpFX | ( | ) |
Give the generator back both rate bounds at the recorded low rate.
| void TnlBumpFX::Start | ( | int | nStep, |
| const HxStr & | colorName, | ||
| int | nForward, | ||
| float | flPathOffset ) |
Start a burst that sweeps towards one lane in one player's colour.
The generator gets its authored spawn rate back, and its spawn clock restarts. The first rotation key of the path's frame owner becomes a turn about Y of (1 - nStep / 8) turns, the rotation keys are sorted, and every rotation tangent is rebuilt. The material's emissive colour becomes the player's colour, and the generator shows.
| nStep | The lane, in eighths of a turn. |
| colorName | The player's colour name. The callers pass a copy, and the name reaches TnlColorFromName() with no further copy. |
| nForward | Non-zero runs the path window forward. |
| flPathOffset | The distance from the song frame to the path window. |
|
inline |
| void TnlBumpFX::SetFrame | ( | float | flFrame | ) |
Advance the burst.
While idle the routine only records flFrame. Otherwise the generator is driven to the time since the start. During the first phase the path window is reset to begin at flFrame + mPathOffset and to end 800 frames later, or earlier when mForward is clear.
| flFrame | The current frame. |