|
wavelength 1.0.0
|
The catcher of a player, the three targets at the bottom of the track the gems fly into. More...
#include <tnlcatcher.h>
Public Member Functions | |
| TnlCatcher (const char *pszColor, GfxTunnel *pTunnel) | |
| Find the views and animations of the catcher of a colour and place its targets. | |
| ~TnlCatcher () | |
| Destroy the catcher. | |
| void | SetAlpha (float flAlpha) |
| Set the opacity of the catcher. | |
| void | SetMultiplied (int bMultiplied) |
| Record whether the multiplier of the player is raised. | |
| void | AttachTo (RndView *pParent) |
| Hang the catcher and the bump flare from a view. | |
| void | Hit (int nTarget) |
| Start the hit animation of a target, if the catcher is shown. | |
| void | SetEnabled (int bEnabled) |
| Set whether the catcher may be shown. | |
| void | SetShown (int bShown) |
| Set whether the catcher is shown. | |
| void | ResetTargets () |
| Stop the hit animations of every target. | |
| void | StopBump (TnlGeom *pGeom, int nPlayer) |
| Hide the bump flare and let the camera of the player follow the player again. | |
| void | StartBump (const TnlActivator *pAttacker, TnlGeom *pGeom, int nPlayer) |
| Show the bump flare in the colour of the attacker and hold the camera of the player. | |
| void | SetRaised (bool bRaised) |
| Move the animation of the catcher towards its raised or its lowered pose. | |
| void | Update (TnlGeom *pGeom, int nPlayer, bool bBumped, float flDelta, float flBumpTime) |
| Advance the hit animations, the animation of the catcher, and the bump flare. | |
Static Public Member Functions | |
| static void | LoadConfig (DataArray *pConfig, DataArray *pDefaults, GfxTunnel *pTunnel, int nOption) |
| Load the size, the offset, and the depth test of the targets. | |
Static Public Attributes | |
| static constexpr int | kNumTargets = 3 |
| The targets of the catcher, one for each gem button. | |
| static float | sTargetSize |
| The scale of a target, target_size. | |
| static float | sTargetOffset |
| The height of a target above the track, target_offset. | |
| static int | sTargetsOnTop |
| Whether the targets draw without a depth test, targets_always_on_top. | |
| static float | sBumpShowTime |
| The time after the start of a bump at which the catcher shows again. | |
| static float | sBumpEndTime |
| The time after the start of a bump at which the flare ends, the last frame of its alpha. | |
The catcher of a player, the three targets at the bottom of the track the gems fly into.
The class is not polymorphic, and the name is inferred. The object is 0x68 bytes. Each target plays a hit animation for a short time after a gem lands in it, and a bumped player shows a flare in the colour of the player who bumped.
| TnlCatcher::TnlCatcher | ( | const char * | pszColor, |
| GfxTunnel * | pTunnel ) |
Find the views and animations of the catcher of a colour and place its targets.
| pszColor | The colour of the player. |
| pTunnel | The tunnel. |
| TnlCatcher::~TnlCatcher | ( | ) |
Destroy the catcher.
| void TnlCatcher::SetAlpha | ( | float | flAlpha | ) |
Set the opacity of the catcher.
The body is empty.
| flAlpha | The opacity. |
| void TnlCatcher::SetMultiplied | ( | int | bMultiplied | ) |
Record whether the multiplier of the player is raised.
| bMultiplied | Whether the multiplier is raised. |
| void TnlCatcher::AttachTo | ( | RndView * | pParent | ) |
Hang the catcher and the bump flare from a view.
| pParent | The view. |
| void TnlCatcher::Hit | ( | int | nTarget | ) |
Start the hit animation of a target, if the catcher is shown.
| nTarget | The target. |
| void TnlCatcher::SetEnabled | ( | int | bEnabled | ) |
Set whether the catcher may be shown.
| bEnabled | Whether the catcher may be shown. |
| void TnlCatcher::SetShown | ( | int | bShown | ) |
Set whether the catcher is shown.
| bShown | Whether the catcher is shown. |
| void TnlCatcher::ResetTargets | ( | ) |
Stop the hit animations of every target.
| void TnlCatcher::StopBump | ( | TnlGeom * | pGeom, |
| int | nPlayer ) |
Hide the bump flare and let the camera of the player follow the player again.
| pGeom | The geometry of the tunnel. |
| nPlayer | The player. |
| void TnlCatcher::StartBump | ( | const TnlActivator * | pAttacker, |
| TnlGeom * | pGeom, | ||
| int | nPlayer ) |
Show the bump flare in the colour of the attacker and hold the camera of the player.
| pAttacker | The activator of the attacking player, or null for no flare. |
| pGeom | The geometry of the tunnel. |
| nPlayer | The bumped player. |
| void TnlCatcher::SetRaised | ( | bool | bRaised | ) |
Move the animation of the catcher towards its raised or its lowered pose.
| bRaised | Whether the catcher is raised. |
| void TnlCatcher::Update | ( | TnlGeom * | pGeom, |
| int | nPlayer, | ||
| bool | bBumped, | ||
| float | flDelta, | ||
| float | flBumpTime ) |
Advance the hit animations, the animation of the catcher, and the bump flare.
Before the song starts the catcher rises into place with the ticks of the count-in.
| pGeom | The geometry of the tunnel. |
| nPlayer | The player. |
| bBumped | Whether the ship of the player is knocked across the tracks. |
| flDelta | The time since the last update. |
| flBumpTime | The time the bump started. |
|
static |
Load the size, the offset, and the depth test of the targets.
| pConfig | The configuration. |
| pDefaults | The defaults of the configuration. |
| pTunnel | The tunnel, which is not read. |
| nOption | The fourth argument every loader of the tunnel graphics receives, which is not read. |
|
staticconstexpr |
The targets of the catcher, one for each gem button.
|
static |
The scale of a target, target_size.
|
static |
The height of a target above the track, target_offset.
|
static |
Whether the targets draw without a depth test, targets_always_on_top.
|
static |
The time after the start of a bump at which the catcher shows again.
|
static |
The time after the start of a bump at which the flare ends, the last frame of its alpha.