[10341] | 1 | /* |
---|
| 2 | * GravityBombField.h |
---|
| 3 | * |
---|
| 4 | * Created on: Apr 2, 2015 |
---|
| 5 | * Author: meggiman |
---|
| 6 | */ |
---|
| 7 | |
---|
| 8 | #ifndef GRAVITYBOMBFIELD_H_ |
---|
| 9 | #define GRAVITYBOMBFIELD_H_ |
---|
| 10 | |
---|
| 11 | #include "graphics/ParticleSpawner.h" |
---|
| 12 | #include "interfaces/RadarViewable.h" |
---|
| 13 | #include "objects/ForceField.h" |
---|
| 14 | #include "BasicProjectile.h" |
---|
| 15 | #include "worldentities/MovableEntity.h" |
---|
| 16 | #include "core/CoreIncludes.h" |
---|
| 17 | #include "GravityBomb.h" |
---|
[10409] | 18 | #include "graphics/ParticleSpawner.h" |
---|
[10435] | 19 | #include "tools/ParticleInterface.h" |
---|
| 20 | #include <stdlib.h> |
---|
| 21 | #include <time.h> |
---|
| 22 | #include "graphics/Backlight.h" |
---|
[10341] | 23 | |
---|
| 24 | namespace orxonox { |
---|
[10409] | 25 | class GravityBombField: public ForceField, public RadarViewable { |
---|
[10341] | 26 | public: |
---|
| 27 | GravityBombField(Context* context); |
---|
| 28 | virtual ~GravityBombField(); |
---|
| 29 | virtual void tick(float dt); |
---|
| 30 | virtual void destroy(); |
---|
[10435] | 31 | |
---|
| 32 | void setShooter(Pawn* shooter) |
---|
| 33 | { this->shooter_ = shooter; } |
---|
| 34 | |
---|
| 35 | Pawn* getShooter() |
---|
| 36 | { return this->shooter_; } |
---|
| 37 | |
---|
[10341] | 38 | private: |
---|
| 39 | static const float FORCE_FIELD_LIFETIME; |
---|
| 40 | static const float FORCE_SPHERE_START_RADIUS; |
---|
| 41 | static const float FORCE_SPHERE_START_STRENGTH; |
---|
[10435] | 42 | static const float FORCE_FIELD_EXPLOSION_DAMMAGE; |
---|
| 43 | static const float EXPLOSION_DURATION; |
---|
| 44 | static const float EXPLOSION_RADIUS; |
---|
| 45 | static const float PEAK_ANGULAR_VELOCITY; |
---|
| 46 | static const float PEAK_EXPLOSION_FORCE; |
---|
[10341] | 47 | |
---|
| 48 | float forceSphereRadius_; |
---|
| 49 | float forceStrength_; |
---|
| 50 | float lifetime_; |
---|
[10435] | 51 | Vector3 rotationVector_; |
---|
[10409] | 52 | bool fieldExploded_; |
---|
| 53 | ParticleEmitter * particleSphere_; |
---|
[10435] | 54 | ParticleEmitter * explosionCross_; |
---|
| 55 | std::vector<Pawn*> victimsAlreadyDamaged_; |
---|
| 56 | MovableEntity * bombModel_; |
---|
| 57 | Pawn* shooter_; |
---|
[10341] | 58 | }; |
---|
| 59 | |
---|
| 60 | } |
---|
| 61 | #endif /* GRAVITYBOMBFIELD_H_ */ |
---|
| 62 | |
---|