[10326] | 1 | /* |
---|
| 2 | * ORXONOX - the hottest 3D action shooter ever to exist |
---|
| 3 | * > www.orxonox.net < |
---|
| 4 | * |
---|
| 5 | * |
---|
| 6 | * License notice: |
---|
| 7 | * |
---|
| 8 | * This program is free software; you can redistribute it and/or |
---|
| 9 | * modify it under the terms of the GNU General Public License |
---|
| 10 | * as published by the Free Software Foundation; either version 2 |
---|
| 11 | * of the License, or (at your option) any later version. |
---|
| 12 | * |
---|
| 13 | * This program is distributed in the hope that it will be useful, |
---|
| 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
| 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
| 16 | * GNU General Public License for more details. |
---|
| 17 | * |
---|
| 18 | * You should have received a copy of the GNU General Public License |
---|
| 19 | * along with this program; if not, write to the Free Software |
---|
| 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
---|
| 21 | * |
---|
| 22 | * Author: |
---|
| 23 | * Gabriel Nadler |
---|
| 24 | * Co-authors: |
---|
| 25 | * simonmie |
---|
| 26 | * |
---|
| 27 | */ |
---|
| 28 | |
---|
| 29 | |
---|
| 30 | /* |
---|
| 31 | * GravityBomb.h |
---|
| 32 | * |
---|
| 33 | * Created on: Mar 19, 2015 |
---|
| 34 | * Author: meggiman |
---|
| 35 | */ |
---|
| 36 | |
---|
| 37 | #ifndef GravityBOMB_H_ |
---|
| 38 | #define GravityBOMB_H_ |
---|
| 39 | |
---|
| 40 | #include "weapons/WeaponsPrereqs.h" |
---|
| 41 | |
---|
| 42 | #include "tools/Timer.h" |
---|
| 43 | |
---|
| 44 | #include "graphics/ParticleSpawner.h" |
---|
| 45 | #include "interfaces/RadarViewable.h" |
---|
[10336] | 46 | #include "objects/ForceField.h" |
---|
[10326] | 47 | #include "BasicProjectile.h" |
---|
[10336] | 48 | #include "worldentities/MovableEntity.h" |
---|
| 49 | #include "core/CoreIncludes.h" |
---|
[10341] | 50 | #include "objects/collisionshapes/SphereCollisionShape.h" |
---|
| 51 | #include "../../../orxonox/worldentities/WorldEntity.h" |
---|
| 52 | #include "GravityBombField.h" |
---|
[10326] | 53 | |
---|
| 54 | namespace orxonox |
---|
| 55 | { |
---|
| 56 | |
---|
[10336] | 57 | class _WeaponsExport GravityBomb : public BasicProjectile , public MovableEntity, public RadarViewable |
---|
[10326] | 58 | { |
---|
| 59 | public: |
---|
| 60 | GravityBomb(Context* context); |
---|
[10336] | 61 | virtual ~GravityBomb(); |
---|
| 62 | virtual void tick(float dt); |
---|
[10326] | 63 | |
---|
[10336] | 64 | virtual bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* cs, btManifoldPoint& contactPoint); |
---|
[10341] | 65 | void detonate(); |
---|
[10326] | 66 | private: |
---|
[10391] | 67 | bool isDetonated_; //Used to check whether the Bomb has to be destroyed during next tick. |
---|
| 68 | float timeToLife_; //Time the bomb flies before it explodes. |
---|
[10336] | 69 | |
---|
| 70 | }; |
---|
[10326] | 71 | } |
---|
| 72 | #endif /* GravityBOMB_H_ */ |
---|