Animation attributes

The next set of new attributes are all related to the new frame animation functionality in our Particle. Here are those attributes in the code:

Uint32 m_animation_frames;
Uint32 m_current_frame;
Uint32 m_next_frame_ms;

The first attribute, m_animation_framesis the value that's passed indirectly from the JavaScript. It tells the Particle class how many frames are in the sprite texture when it renders that texture to the canvas. The second attribute, m_current_frameis used by the Particle class to keep track of which frame it should currently be rendering. The final attribute variable, m_next_frame_ms, tells the particle how many milliseconds are left before it must increment its current frame to display the next frame in the sequence.