source:
orxonox.OLD/branches/presentation/src/world_entities/effects/explosion.h
Last change on this file was 10724, checked in by snellen, 18 years ago | |
---|---|
File size: 1.3 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); } |
[10724] | 25 | void playSound(); |
[10665] | 26 | |
[7047] | 27 | Explosion (); |
28 | virtual ~Explosion (); | |
[3708] | 29 | |
[5443] | 30 | virtual void activate(); |
31 | virtual void deactivate(); | |
[4890] | 32 | |
[5443] | 33 | virtual void tick (float time); |
34 | ||
[10698] | 35 | void setLifeTime( float lifeTime ){ this->lifeTime = lifeTime; } |
36 | ||
37 | protected: | |
[7047] | 38 | static FastFactory* fastFactory; |
[5443] | 39 | |
[7047] | 40 | float lifeTime; |
41 | float lifeCycle; | |
[5447] | 42 | |
[7103] | 43 | static SpriteParticles* explosionParticles; |
[7125] | 44 | BoxEmitter* emitter; |
[10695] | 45 | |
46 | OrxSound::SoundSource explosionSound; | |
47 | OrxSound::SoundBuffer explosionSoundBuffer; | |
[3708] | 48 | }; |
49 | ||
[7047] | 50 | #endif /* _EXPLOSION_H */ |
Note: See TracBrowser
for help on using the repository browser.