|
JubeatPlus 3.9.11
|
Draws and animates the result screen's item-chance sequence. More...
#include <ResultItemChance.h>


Instance Methods | |
| (void) | - loadTexure |
| Builds the sprite sheet and resets the particle state. | |
| (void) | - releaseTexture |
| Drops the sprite sheet. | |
| (void) | - setInfo:itemNum:size:center:scale: |
| Configures the sequence for one item award and seeds its particle field. | |
| (BOOL) | - draw |
| Advances and renders one frame of the sequence. | |
| (BOOL) | - enableSkip |
| Whether the sequence may be skipped. | |
| (void) | - renderEffectParts:posX:posY:alpha: |
| Draws one particle sprite at a point with an alpha. | |
| (void) | - renderEffectParts:posX:posY:color: |
| Draws one particle sprite at a point tinted by a colour. | |
| (void) | - renderEffect |
| Renders the thirty-two-particle burst for the current frame. | |
| (void) | - restartAnimation |
| Re-seeds the particle field and restarts the animation. | |
Properties | |
| id | aDelegate |
| The delegate notified about the animation. | |
| EAGLView * | eaglView |
| The rendering surface. | |
Draws and animates the result screen's item-chance sequence.
| - (BOOL) draw |
Advances and renders one frame of the sequence.
Fades the background frame in over its first eight frames, then runs the particle burst, plays the award sound effect once, and stages the item icon, the "get" board, and the number board as the frame counter passes their cue points. Advances the frame counter and reports completion.
YES once the animation has run past its final frame (frame counter above 0x31). | - (BOOL) enableSkip |
Whether the sequence may be skipped.
YES once the frame counter has passed 0x32. | - (void) loadTexure |
Builds the sprite sheet and resets the particle state.
Allocates the Texture2D, decrypts the bundled item_chance_tex.tex atlas into it with the texture cipher key, loads the sprite rectangles from item_chance_tex.plist , clears the frame counter and the four particle-visibility quad-words, and reads the effect size from sprite 8.
| - (void) releaseTexture |
Drops the sprite sheet.
| - (void) renderEffect |
Renders the thirty-two-particle burst for the current frame.
Each live particle eases along its stored direction with a double sin -shaped envelope, fading in over the first fifth of its life and out over the rest, and ages by one frame.
| - (void) renderEffectParts: | (int) | type | |
| posX: | (int) | posX | |
| posY: | (int) | posY | |
| alpha: | (float) | alpha |
Draws one particle sprite at a point with an alpha.
| type | The particle type; the sprite index is type + 8 . |
| posX | The x centre, already offset by screenCenter . |
| posY | The y centre. |
| alpha | The opacity. |
| - (void) renderEffectParts: | (int) | type | |
| posX: | (int) | posX | |
| posY: | (int) | posY | |
| color: | (nullable id) | color |
Draws one particle sprite at a point tinted by a colour.
Unused by the current renderEffect , which always calls the alpha overload; kept because the binary carries it. It stretches the sprite into a fixed 64x64 rect (the inRect: overload) and tints it.
| type | The particle type; the sprite index is type + 8 . |
| posX | The x centre. |
| posY | The y centre. |
| color | The tint colour. |
| - (void) restartAnimation |
Re-seeds the particle field and restarts the animation.
Differs from the seeding in setInfo: : particle types run 0..2 rather than 0..8, the spread is measured from effectSize rather than from an absolute offset, and displayScale is not re-applied. Resets the frame counter to zero.
| - (void) setInfo: | (int) | itemType | |
| itemNum: | (int) | itemNum | |
| size: | (CGSize) | size | |
| center: | (CGPoint) | center | |
| scale: | (float) | scale |
Configures the sequence for one item award and seeds its particle field.
The scale argument is inverted into displayScale (the reciprocal), and the centre and size are pre-multiplied by that reciprocal so later drawing works in the unscaled sprite space. The thirty-two particles are seeded with random type, direction, lifetime, and colour. The item icon is loaded from chance_item_0<itemType> ; when more than one is awarded, the "x" glyph and the decimal digits of itemNum are loaded from item_chance_num_<digit> into the trailing sprites.
| itemType | Selects the item icon (loaded as chance_item_0d ). |
| itemNum | How many were awarded; drives the digit sprites. |
| size | The on-screen size, in scaled points. |
| center | The on-screen centre, in scaled points. |
| scale | The result screen's scale; stored inverted. |
|
readwritenonatomicweak |
The delegate notified about the animation.
Weakly held (W in the metadata).
|
readwritenonatomicstrong |
The rendering surface.
Strongly held (& in the metadata).