class explosion
The explosion
class is tailored to give a good solution for explosions.
Explosion sprite is changing it's size by nature (explosion
expanding), but it's center is constant.
The x,y parameters are the center of explosion
, and the i_low and i_high are sprite index for explosion
image.
The f_speed parameter tells the explosion
object the frames-interval between each image (that is how fast explosion is changing).
Once explosion
is done, it is automatically removed from dest BITMAP and the object sprite_index is set to -1.
Thus if(explosion_object->get_sprite_index() == -1) it's time to dispose the explosion
object.
For each frame user have to call the remove(), action()
and draw() method.