Orxonox  0.0.5 Codename: Arcturus
ShootableObstacle.h
Go to the documentation of this file.
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  * Leon Rigoni
24  *
25  */
26 #ifndef _ShootableObstacle_H__
27 #define _ShootableObstacle_H__
29 
30 namespace orxonox // tolua_export
31 {
38  : public Pawn
39  {
40  public:
41  ShootableObstacle(Context* context);
42  virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
43  virtual bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* cs, btManifoldPoint& contactPoint) override;
44 
45  inline void setCollisionDamage(float c)
46  { this->collisionDamage_ = c; }
47 
48  inline float getCollisionDamage()
49  { return this->collisionDamage_; }
50 
51  inline void setEnableCollisionDamage(bool c)
52  {
53  this->enableCollisionDamage_ = c;
54  this->enableCollisionCallback();
55  }
56 
58  { return this->enableCollisionDamage_; }
59 
60  private:
63  };
64 }
65 
66 #endif
Everything in Orxonox that has a health attribute is a Pawn.
Definition: Pawn.h:56
float getCollisionDamage()
Definition: ShootableObstacle.h:48
The WorldEntity represents everything that can be put in a Scene at a certain location.
Definition: WorldEntity.h:72
xmlelement
Definition: Super.h:519
Die Wagnis Klasse hat die folgenden Aufgaben:
Definition: ApplicationPaths.cc:66
This class encapsulates a pawn (so an object with health) with the addition, that it damages other ob...
Definition: ShootableObstacle.h:37
Mode
Definition: CorePrereqs.h:102
bool enableCollisionDamage_
Definition: ShootableObstacle.h:62
Definition: Context.h:45
#define _OrxonoxExport
Definition: OrxonoxPrereqs.h:60
void setEnableCollisionDamage(bool c)
Definition: ShootableObstacle.h:51
void setCollisionDamage(float c)
Definition: ShootableObstacle.h:45
float collisionDamage_
Definition: ShootableObstacle.h:61
bool getEnableCollisionDamage()
Definition: ShootableObstacle.h:57