Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/Boxhead_FS19/src/modules/weapons/projectiles/HoverGunProjectile.h @ 12394

Last change on this file since 12394 was 12284, checked in by cwaupoti, 6 years ago

added working HoverGun

File size: 2.3 KB
RevLine 
[12262]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:
[12284]23 *      Fabian 'x3n' Landau
[12262]24 *   Co-authors:
[12284]25 *      simonmie
[12262]26 *
27 */
28
29/**
[12273]30    @file HoverGunProjectile.h
31    @brief Definition of the HoverGunProjectile class.
[12262]32*/
33
34#ifndef _HoverGunProjectile_H__
35#define _HoverGunProjectile_H__
36
37#include "weapons/WeaponsPrereqs.h"
38
39#include "tools/Timer.h"
[12284]40#include "worldentities/MovableEntity.h"
41#include "objects/collisionshapes/SphereCollisionShape.h"
[12262]42
[12284]43#include "BasicProjectile.h"
44
[12262]45namespace orxonox
46{
47
48    /**
49    @brief
[12284]50        Represents all 'standard' projectiles.
51
[12262]52    @author
[12284]53        Fabian 'x3n' Landau
54    @author
55        Simon Miescher
[12262]56    @ingroup WeaponsProjectiles
57    */
[12284]58    class _WeaponsExport HoverGunProjectile : public MovableEntity, public BasicProjectile
[12262]59    {
60        public:
61            HoverGunProjectile(Context* context);
[12284]62            virtual ~HoverGunProjectile();
[12262]63
[12284]64            void setConfigValues();
[12262]65
[12284]66           
67            virtual bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* cs, btManifoldPoint& contactPoint) override;
[12274]68
[12284]69        protected:
70            virtual void setCollisionShapeRadius(float radius);
71            float lifetime_; //!< The time the projectile exists.
[12274]72
[12262]73        private:
[12284]74            Timer destroyTimer_; //!< Timer to destroy the projectile after its lifetime has run out.
75            WeakPtr<SphereCollisionShape> collisionShape_; // The collision shape of the projectile.
[12262]76    };
77}
78
[12284]79#endif /* _Projectile_H__ */
Note: See TracBrowser for help on using the repository browser.