|
JubeatPlus 3.9.11
|
A single ripple sprite that drifts sideways, swells and fades. More...
#include <BGRipple.h>


Instance Methods | |
| (instancetype) | - initWithSprite:atPoint:xSpeed:lifetime:basesize:mag:alpha: |
| Sets the ripple up. | |
| (BOOL) | - step |
| Advances the ripple by one frame. | |
| (void) | - renderWithTexture: |
| Draws the ripple at its current scale and opacity. | |
A single ripple sprite that drifts sideways, swells and fades.
The owner steps every ripple once a frame and drops the ones that report themselves finished, then renders the survivors.
| - (instancetype) initWithSprite: | (NSUInteger) | aSprite | |
| atPoint: | (CGPoint) | aPoint | |
| xSpeed: | (float) | anXSpeed | |
| lifetime: | (unsigned int) | aLifetime | |
| basesize: | (float) | basesize | |
| mag: | (float) | aMag | |
| alpha: | (float) | alpha |
Sets the ripple up.
Nothing here is animated yet.
| aSprite | The sprite index within the background texture. |
| aPoint | Where the ripple is centred. |
| anXSpeed | How far it drifts each step, horizontally only. |
| aLifetime | How many steps it lasts. |
| basesize | The sprite's nominal size, used only to offset the draw from its anchor. |
| aMag | The scale before the swell is applied. |
| alpha | The opacity before the fades are applied. |
| - (void) renderWithTexture: | (nullable Texture2D *) | texture |
Draws the ripple at its current scale and opacity.
Silently does nothing once the ripple is past its lifetime, so a caller that ignores -step simply stops seeing it.
| texture | The background texture the sprite lives in. |
| - (BOOL) step |
Advances the ripple by one frame.