Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/trunk/src/world_entities/effects/explosion.h @ 10772

Last change on this file since 10772 was 10698, checked in by snellen, 17 years ago

merged adm, hud, vs-enhancements : beni's responsible for this commit. blame him!

File size: 1.2 KB
Line 
1/*!
2 * @file explosion.h
3 * @brief a Explosion Projectile
4*/
5
6#ifndef _EXPLOSION_H
7#define _EXPLOSION_H
8
9#include "world_entity.h"
10#include "sound_source.h"
11#include "sound_buffer.h"
12#include "sound/resource_sound_buffer.h"
13
14class SpriteParticles;
15class BoxEmitter;
16class FastFactory;
17
18class Explosion : public WorldEntity
19{
20  ObjectListDeclaration(Explosion);
21  public:
22    static void explode (PNode* position, const Vector& size);
23    void explode (float x, float y, float z); /// Explode at the current position with size (x,y,z)
24    void setExplosionSound(const std::string& newExplosionSound){  this->explosionSoundBuffer = OrxSound::ResourceSoundBuffer(newExplosionSound);  }
25   
26    Explosion ();
27    virtual ~Explosion ();
28
29    virtual void activate();
30    virtual void deactivate();
31
32    virtual void tick (float time);
33
34    void setLifeTime( float lifeTime ){ this->lifeTime = lifeTime; }
35
36  protected:
37    static FastFactory*        fastFactory;
38
39    float                      lifeTime;
40    float                      lifeCycle;
41
42    static SpriteParticles*    explosionParticles;
43    BoxEmitter*                emitter;
44   
45    OrxSound::SoundSource      explosionSound;
46    OrxSound::SoundBuffer      explosionSoundBuffer;
47};
48
49#endif /* _EXPLOSION_H */
Note: See TracBrowser for help on using the repository browser.