#ifndef __JETPAC_EXPLOSION_INCLUDED__ #define __JETPAC_EXPLOSION_INCLUDED__ #include "Billboard.h" namespace irr { namespace scene { class Explosion : public Billboard { public: Explosion(ISceneManager* mgr, core::array &textures, core::vector3df pos, ZXCOLOUR col=White1, u32 Length=300) : Billboard(mgr, textures[0], 1) { IsAlive = true; IsDestructable = false; Expires = true; // create texture animator ISceneNodeAnimator *anm = mgr->createTextureAnimator( textures, Length / textures.size(), false); Bill->addAnimator(anm); anm->drop(); Bill->getMaterial(0).AmbientColor = col; // deletion animator anm = mgr->createDeleteAnimator(Length); addAnimator(anm); anm->drop(); setPosition(pos); updateAbsolutePosition(); Bill->updateAbsolutePosition(); } }; } // scene } // irr #endif