Orxonox  0.0.5 Codename: Arcturus
FlappyOrxShip.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  * Leo Merholz
24  * Pascal Schärli
25  * Co-authors:
26  * ...
27  *
28  */
29 
35 #ifndef _FlappyOrxShip_H__
36 #define _FlappyOrxShip_H__
37 
39 
40 #include "weapons/WeaponsPrereqs.h"
43 #include "FlappyOrx.h"
44 
45 
46 namespace orxonox
47 {
49  {
50  public:
51  FlappyOrxShip(Context* context);
52 
53  virtual void tick(float dt) override;
54 
55  // Starts or stops fireing
56  virtual void boost(bool bBoost) override;
57 
58  inline void setSpeedBase(float speedBase){ getGame()->setSpeedBase(speedBase);}
59  inline float getSpeedBase(){ return getGame()->getSpeedBase();}
60  inline void setSpeedIncrease(float speedIncrease){ getGame()->setSpeedIncrease(speedIncrease);}
61  inline float getSpeedIncrease(){ return getGame()->getSpeedIncrease();}
62 
63  inline void setTubeDistanceBase(float tubeDistanceBase){ getGame()->setTubeDistanceBase(tubeDistanceBase);}
64  inline float getTubeDistanceBase(){ return getGame()->getTubeDistanceBase();}
65  inline void setTubeDistanceIncrease(float tubeDistanceIncrease){ getGame()->setTubeDistanceIncrease(tubeDistanceIncrease);}
66  inline float getTubeDistanceIncrease(){ return getGame()->getTubeDistanceIncrease();}
67 
68  inline void setUpwardthrust( float upwardThrust ){ this->upwardThrust = upwardThrust; }
69  inline float getUpwardthrust(){ return this->upwardThrust; }
70  inline void setGravity( float gravity ){ this->gravity = gravity; }
71  inline float getGravity(){ return this->gravity; }
72 
73  inline void setSpeed( float speed ){ this->speed = speed; }
74  inline float getSpeed( ){ return this->speed; }
75 
76 
77  virtual time_t timeUntilRespawn();
78 
79  virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
80 
81 
82  protected:
83  virtual void death() override;
84  private:
85  FlappyOrx* getGame();
88  bool isFlapping;
89  bool isDead;
90  float velocity;
91  float speed, upwardThrust, gravity;
92  float particleAge, particleLifespan;
93  time_t deathTime;
94 
95  };
96 }
97 
98 #endif /* _FlappyOrxShip_H__ */
float getGravity()
Definition: FlappyOrxShip.h:71
void setTubeDistanceBase(float tubeDistanceBase)
Definition: FlappyOrxShip.h:63
Definition: CorePrereqs.h:309
void setSpeedBase(float speedBase)
Definition: FlappyOrxShip.h:58
float getSpeed()
Definition: FlappyOrxShip.h:74
void setTubeDistanceIncrease(float tubeDistanceIncrease)
Definition: FlappyOrxShip.h:65
ParticleSpawner * particlespawner_
Definition: FlappyOrxShip.h:87
bool isFlapping
Definition: FlappyOrxShip.h:88
Shared library macros, enums, constants and forward declarations for the weapons module ...
#define _FlappyOrxExport
Definition: FlappyOrxPrereqs.h:61
Definition: ParticleSpawner.h:39
Definition: FlappyOrx.h:63
time_t deathTime
Definition: FlappyOrxShip.h:93
void setUpwardthrust(float upwardThrust)
Definition: FlappyOrxShip.h:68
WeakPtr wraps a pointer to an object, which becomes nullptr if the object is deleted.
Definition: CorePrereqs.h:236
Gametype.
float particleLifespan
Definition: FlappyOrxShip.h:92
xmlelement
Definition: Super.h:519
The SpaceShip is the principal entity through which the player interacts with the game...
Definition: SpaceShip.h:90
float getTubeDistanceIncrease()
Definition: FlappyOrxShip.h:66
bool isDead
Definition: FlappyOrxShip.h:89
float velocity
Definition: FlappyOrxShip.h:90
float getUpwardthrust()
Definition: FlappyOrxShip.h:69
float getSpeedBase()
Definition: FlappyOrxShip.h:59
Die Wagnis Klasse hat die folgenden Aufgaben:
Definition: ApplicationPaths.cc:66
Mode
Definition: CorePrereqs.h:102
WeakPtr< FlappyOrx > game
Definition: FlappyOrxShip.h:86
Definition: Context.h:45
void setSpeedIncrease(float speedIncrease)
Definition: FlappyOrxShip.h:60
float getSpeedIncrease()
Definition: FlappyOrxShip.h:61
Shared library macros, enums, constants and forward declarations for the FlappyOrx module ...
void setSpeed(float speed)
Definition: FlappyOrxShip.h:73
void setGravity(float gravity)
Definition: FlappyOrxShip.h:70
float upwardThrust
Definition: FlappyOrxShip.h:91
Definition: FlappyOrxShip.h:48
float getTubeDistanceBase()
Definition: FlappyOrxShip.h:64