Orxonox  0.0.5 Codename: Arcturus
GravityBomb.h
Go to the documentation of this file.
1 /*
2  * GravityBomb.h
3  *
4  * Created on: Mar 19, 2015
5  * Author: meggiman
6  */
7 
8 #ifndef GravityBOMB_H_
9 #define GravityBOMB_H_
10 
11 #include "weapons/WeaponsPrereqs.h"
12 
13 #include "tools/Timer.h"
14 
17 #include "objects/ForceField.h"
18 #include "BasicProjectile.h"
20 #include "core/CoreIncludes.h"
23 #include "GravityBombField.h"
24 #include "sound/WorldSound.h"
25 
26 namespace orxonox
27 {
39  {
40  public:
41  GravityBomb(Context* context);
42  virtual ~GravityBomb();
43  virtual void tick(float dt) override;
44 
45  virtual bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* cs, btManifoldPoint& contactPoint) override;
46  void detonate();
47  private:
48  static const float LIFETIME;
49 
51  float timeToLife_; //Time the bomb flies before it explodes.
53  };
54 }
55 #endif /* GravityBOMB_H_ */
WorldSound * bombSound_
Definition: GravityBomb.h:52
The WorldSound class is to be used for sounds with position and orientation.
Definition: WorldSound.h:44
Shared library macros, enums, constants and forward declarations for the weapons module ...
Definition of the SphereCollisionShape class.
Definition: MovableEntity.h:42
Interface for receiving window events.
Definition: RadarViewable.h:48
The WorldEntity represents everything that can be put in a Scene at a certain location.
Definition: WorldEntity.h:72
Declaration of the Timer class, used to call functions after a given time-interval.
Die Wagnis Klasse hat die folgenden Aufgaben:
Definition: ApplicationPaths.cc:66
This class implements how long the bomb flies before it places the GravityField at it's last possitio...
Definition: GravityBomb.h:38
float timeToLife_
Definition: GravityBomb.h:51
Definition: Context.h:45
Defines several very important macros used to register objects, register classes, and to work with id...
Implementation of the BasicProjectile class.
Definition of the ForceField class.
static const float LIFETIME
The gravity bomb lifetime in seconds.
Definition: GravityBomb.h:48
Baseclass of all projectiles.
Definition: BasicProjectile.h:54
bool hasCollided_
Definition: GravityBomb.h:50
#define _WeaponsExport
Definition: WeaponsPrereqs.h:60