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










