|
resonance 1.0.1
|
Three-target catcher of one player's activator, with its multiplier texture and movie. More...
#include <tnlcatcher.h>

Public Types | |
| enum | { kTargetCount = 3 } |
| Number of targets. More... | |
Public Member Functions | |
| TnlCatcher (const HxStr &colorName) | |
| Resolve the view, the targets, the materials, the textures, and the movie. | |
| void | SetMultiplied (int nMultiplied) |
| Switch the material between the plain and the multiplier texture. | |
| void | ResetTargets () |
| Put every target on the "tar up" material. | |
| void | Hit (int nTarget) |
| Put one target on the "tar dn" material and restart the hit count. | |
| void | SetAlpha (float flAlpha) |
| Set the alpha of the "act_<c>.mat" material. | |
| void | AttachTo (Rnd::View *pParent) |
| Parent the view to another view for both transform and drawing. | |
| void | Update (float flFrame) |
| Advance the multiplier movie, the hit count, and the view. | |
Public Attributes | |
| Rnd::View * | mView |
| Catcher view, "catcher_<c>". | |
Three-target catcher of one player's activator, with its multiplier texture and movie.
The class is not polymorphic and emits no RTTI, and no allocation tag or file path identifies it. The name is inferred from its view, "catcher_<c>", where <c> is the first letter of the player's colour name.
Hit() swaps one target to the "tar dn" material. Ten updates later every target returns to the "tar up" material, and the view is driven to mTarget * 100 plus twice the updates since the hit, capped at 100.
TnlActivator embeds one, 0x3c bytes, at +0x5c.
|
explicit |
Resolve the view, the targets, the materials, the textures, and the movie.
The multiplier starts off, every target starts on the "tar up" material, and both counts start at 100000000.
| colorName | The player's colour name, whose first letter selects every object. |
| void TnlCatcher::SetMultiplied | ( | int | nMultiplied | ) |
Switch the material between the plain and the multiplier texture.
| nMultiplied | Non-zero for "act_mult_<c>.tex", zero for "act_<c>.bmp". |
| void TnlCatcher::ResetTargets | ( | ) |
Put every target on the "tar up" material.
| void TnlCatcher::Hit | ( | int | nTarget | ) |
Put one target on the "tar dn" material and restart the hit count.
Does nothing while the view is hidden. The image has no caller.
| nTarget | The target, 0 through 2. |
| void TnlCatcher::SetAlpha | ( | float | flAlpha | ) |
Set the alpha of the "act_<c>.mat" material.
| flAlpha | The alpha. |
| void TnlCatcher::AttachTo | ( | Rnd::View * | pParent | ) |
Parent the view to another view for both transform and drawing.
The image has no caller.
| pParent | The parent view. |
| void TnlCatcher::Update | ( | float | flFrame | ) |
Advance the multiplier movie, the hit count, and the view.
The view frame is written only when flFrame is not negative. The image has no caller.
| flFrame | The scaled song position TnlActivator::Update() receives. |
| Rnd::View* TnlCatcher::mView |
Catcher view, "catcher_<c>".
Public because TnlActivator shows and hides it directly and the image has no accessor.