Data Fields |
|
RwReal | duration |
RwInt32 | numSteps |
RwInt32 | sequences [rpCROWDANIMATIONMAXSTEPS][rpCROWDANIMATIONNUMSEQ] |
Four independent looping animation sequences are available, with a maximum of 16 steps in each. A particular billboard of the crowd will be randomly assigned to one of the sequences and started off at a random point in that sequence.
When a crowd is created with RpCrowdCreate, any number of animations can be registered, and the application may switch between them as required using RpCrowdSetCurrentAnim. This might happen simultaneously with a switch to another texture when certain events take place, such as goal scores.
The crowd animation state is updated using RpCrowdAddAnimTime.
An example of an animation is shown below. The 1st sequence (first column) shows a ping-pong animation loop. The 4th sequence uses the same loop but at a different speed. The 2nd and 3rd sequences represent a cycling animation at different speeds.
RpCrowdAnimation CrowdAnim1 = { 2.0f, 16, { {0, 4, 4, 0}, {1, 4, 4, 0}, {2, 5, 4, 1}, {3, 5, 5, 1}, {3, 6, 5, 2}, {2, 6, 5, 2}, {1, 7, 5, 3}, {0, 7, 5, 3}, {0, 7, 6, 3}, {1, 4, 6, 3}, {2, 5, 6, 2}, {3, 6, 6, 1}, {3, 6, 6, 1}, {2, 6, 7, 1}, {1, 7, 7, 0}, {0, 7, 7, 0} } };
|
Duration of the animation (arbitrary units) |
|
Number of steps in the animation sequences (maximum 16). |
|
Table of 4 looping animation sequences. Each sequence is an array of numSteps indices specifying the rows of the crowd texture to use in the animation. |
Converted from CHM to HTML with chm2web Pro 2.85 (unicode) |