/*! * @file lightning_bolt.h * @brief a LightningBolt Projectile * Der Effekt soll folgenderma�n funktionieren: * -> Ein Partikel mit einer Blitz-Textur soll sehr schnell erscheinen, * -> w�rend er an Intensit� zunimmt soll die Beleuchtung der gerenderten Szene entsprechend zunehmen. * -> Je mehr Blitze zum gleichen Zeitpunkt sichtbar sind, desto heller soll die Beleuchtung werden, das hei� die Helligkeitszunahme pro Blitz soll Additiv sein. * -> Ein Partikel soll ebenfalls sehr schnell wieder verblassen, dabei soll die Beleuchtung entsprechend der vorhergehenden Zunahme wieder abnehmen (Additiv) */ #ifndef _LIGHTNING_BOLT_H #define _LIGHTNING_BOLT_H #include "world_entity.h" #include "sound_buffer.h" #include "sound_source.h" class Material; class LightningBolt : public WorldEntity { ObjectListDeclaration(LightningBolt); public: LightningBolt(const TiXmlElement* root = NULL); virtual ~LightningBolt (); virtual void activate(); virtual void deactivate(); virtual void tick(float time); virtual void draw() const; private: float flashFrequency; //!< frequency to activate itself float flashRisingTime; //!< time to rise float flashConstTime; //!< time to be drawn float flashFallTime; //!< time to fall float time; //!< time bool bRender; bool bNewCoordinate; Material* material; Vector offset; float width; float height; float seedX; float seedZ; float seedTime; OrxSound::SoundSource soundSource; OrxSound::SoundBuffer thunderBuffer; }; #endif /* _LIGHTNING_BOLT_H */