| 1 | /*! | 
|---|
| 2 |  * @file lightning_bolt.h | 
|---|
| 3 |  * @brief a LightningBolt Projectile | 
|---|
| 4 |  *  Der Effekt soll folgenderma�n funktionieren: | 
|---|
| 5 |  * -> Ein Partikel mit einer Blitz-Textur soll sehr schnell erscheinen, | 
|---|
| 6 |  * -> w�rend er an Intensit� zunimmt soll die Beleuchtung der gerenderten Szene entsprechend zunehmen. | 
|---|
| 7 |  * -> Je mehr Blitze zum gleichen Zeitpunkt sichtbar sind, desto heller soll die Beleuchtung werden, das hei� die Helligkeitszunahme pro Blitz soll Additiv sein. | 
|---|
| 8 |  * -> Ein Partikel soll ebenfalls sehr schnell wieder verblassen, dabei soll die Beleuchtung entsprechend der vorhergehenden Zunahme wieder abnehmen (Additiv) | 
|---|
| 9 |  */ | 
|---|
| 10 |  | 
|---|
| 11 | #ifndef _LIGHTNING_BOLT_H | 
|---|
| 12 | #define _LIGHTNING_BOLT_H | 
|---|
| 13 |  | 
|---|
| 14 | #include "world_entity.h" | 
|---|
| 15 |  | 
|---|
| 16 | #include "sound_buffer.h" | 
|---|
| 17 | #include "sound_source.h" | 
|---|
| 18 |  | 
|---|
| 19 | class Material; | 
|---|
| 20 |  | 
|---|
| 21 | class LightningBolt : public WorldEntity | 
|---|
| 22 | { | 
|---|
| 23 |   ObjectListDeclaration(LightningBolt); | 
|---|
| 24 |   public: | 
|---|
| 25 |     LightningBolt(const TiXmlElement* root = NULL); | 
|---|
| 26 |     virtual ~LightningBolt (); | 
|---|
| 27 |  | 
|---|
| 28 |     virtual void activate(); | 
|---|
| 29 |     virtual void deactivate(); | 
|---|
| 30 |  | 
|---|
| 31 |     virtual void tick(float time); | 
|---|
| 32 |     virtual void draw() const; | 
|---|
| 33 |  | 
|---|
| 34 |   private: | 
|---|
| 35 |     float flashFrequency;                   //!< frequency to activate itself | 
|---|
| 36 |     float flashRisingTime;                  //!< time to rise | 
|---|
| 37 |     float flashConstTime;                   //!< time to be drawn | 
|---|
| 38 |     float flashFallTime;                    //!< time to fall | 
|---|
| 39 |  | 
|---|
| 40 |     float time;                             //!< time | 
|---|
| 41 |  | 
|---|
| 42 |     bool  bRender; | 
|---|
| 43 |     bool  bNewCoordinate; | 
|---|
| 44 |     Material*      material; | 
|---|
| 45 |     Vector         offset; | 
|---|
| 46 |     float width; | 
|---|
| 47 |     float height; | 
|---|
| 48 |  | 
|---|
| 49 |     float seedX; | 
|---|
| 50 |     float seedZ; | 
|---|
| 51 |     float seedTime; | 
|---|
| 52 |  | 
|---|
| 53 |     OrxSound::SoundSource    soundSource; | 
|---|
| 54 |     OrxSound::SoundBuffer    thunderBuffer; | 
|---|
| 55 | }; | 
|---|
| 56 |  | 
|---|
| 57 | #endif /* _LIGHTNING_BOLT_H */ | 
|---|