Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/weaponFS15/src/modules/weapons/projectiles/GravityBomb.h @ 10391

Last change on this file since 10391 was 10391, checked in by meggiman, 9 years ago

Implemented all necessary classes. No the weapon works without bugs.

File size: 2.0 KB
Line 
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"
46#include "objects/ForceField.h"
47#include "BasicProjectile.h"
48#include "worldentities/MovableEntity.h"
49#include "core/CoreIncludes.h"
50#include "objects/collisionshapes/SphereCollisionShape.h"
51#include "../../../orxonox/worldentities/WorldEntity.h"
52#include "GravityBombField.h"
53
54namespace orxonox
55{
56
57        class _WeaponsExport GravityBomb : public BasicProjectile , public MovableEntity, public RadarViewable
58        {
59                public:
60                        GravityBomb(Context* context);
61                        virtual ~GravityBomb();
62                        virtual void tick(float dt);
63
64                        virtual bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* cs, btManifoldPoint& contactPoint);
65                        void detonate();
66                private:
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.
69
70        };
71}
72#endif /* GravityBOMB_H_ */
Note: See TracBrowser for help on using the repository browser.