|
JubeatPlus 3.9.11
|
A single animated decoration on the knit background. More...
#include <EffectBgKnit.h>


Instance Methods | |
| (void) | - init:effType:startPos:wmin:wmax:move: |
| Sets the sprite up. | |
| (float) | - expand:totalFrame:max: |
| A triangle wave over the effect's own cycle. | |
| (BOOL) | - renderEffect |
| Advances the animation by one frame and draws it. | |
A single animated decoration on the knit background.
One instance runs one effect of one type for a fixed number of frames and then reports that it is finished. The class declares no properties; its nine ivars carry the sprite's texture, position, frame counter and per-type width limits.
| - (float) expand: | (int) | frame | |
| totalFrame: | (int) | totalFrame | |
| max: | (float) | max |
A triangle wave over the effect's own cycle.
Ramps from zero to max across the first half of totalFrame and back down across the second, so the value peaks at the midpoint. Single precision throughout — the metadata encodes both the argument and the return as f, not d.
| frame | The current frame. Taken modulo totalFrame, so it may run past it. |
| totalFrame | The cycle's length. |
| max | The value at the midpoint. |
| - (void) init: | (nullable Texture2D *) | texture | |
| effType: | (int) | effType | |
| startPos: | (CGPoint) | startPos | |
| wmin: | (int) | wmin | |
| wmax: | (int) | wmax | |
| move: | (int) | move |
Sets the sprite up.
Returns void, not an object, despite the name.
The metadata encodes it v56@0:8@16i24{CGPoint=dd}28i44i48i52 and it never chains to an initialiser. The frame counter starts at zero and the duration is chosen from the effect type: ten frames for type zero and a hundred and twenty for every other.
Note that width_ is the one ivar this does not set.
| texture | The sprite's texture. Stored strongly. |
| effType | Which of the six effects to run. |
| startPos | Where to draw it. |
| wmin | The narrowest width the effect uses. |
| wmax | The widest width the effect uses. |
| move | How far the effect travels. |
| - (BOOL) renderEffect |
Advances the animation by one frame and draws it.
Dispatches six ways on the effect type. Returns YES once the frame counter has reached the effect's duration, so a caller can drop the sprite. A type outside the six draws nothing but still ages, so it retires on schedule.