JubeatPlus 3.9.11
Loading...
Searching...
No Matches
BGRipple Class Reference

A single ripple sprite that drifts sideways, swells and fades. More...

#include <BGRipple.h>

Inheritance diagram for BGRipple:
Collaboration diagram for BGRipple:

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.

Detailed Description

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.

Method Documentation

◆ initWithSprite:atPoint:xSpeed:lifetime:basesize:mag:alpha:

- (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.

Parameters
aSpriteThe sprite index within the background texture.
aPointWhere the ripple is centred.
anXSpeedHow far it drifts each step, horizontally only.
aLifetimeHow many steps it lasts.
basesizeThe sprite's nominal size, used only to offset the draw from its anchor.
aMagThe scale before the swell is applied.
alphaThe opacity before the fades are applied.
Ghidra address:
0x143b38
Ghidra address:
0x143b38

◆ renderWithTexture:

- (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.

Parameters
textureThe background texture the sprite lives in.
Ghidra address:
0x143c70

◆ step

- (BOOL) step

Advances the ripple by one frame.

Returns
YES once the frame counter has passed the lifetime, at which point nothing further happens and the owner should drop it.
Ghidra address:
0x143c0c
Ghidra address:
0x143c0c

The documentation for this class was generated from the following files: