Orxonox  0.0.5 Codename: Arcturus
JumpFigure.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  * Fabien Vultier
24  * Co-authors:
25  * ...
26  *
27  */
28 
29 #ifndef _JumpFigure_H__
30 #define _JumpFigure_H__
31 
32 #include "jump/JumpPrereqs.h"
34 
35 namespace orxonox
36 {
38  {
39  public:
40  JumpFigure(Context* context);
41  virtual ~JumpFigure() {}
42  virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
43  virtual void tick(float dt) override;
44  virtual void moveFrontBack(const Vector2& value) override;
45  virtual void moveRightLeft(const Vector2& value) override;
46  virtual void rotateYaw(const Vector2& value) override;
47  virtual void rotatePitch(const Vector2& value) override;
48  virtual void rotateRoll(const Vector2& value) override;
49  void fire(unsigned int firemode);
50  virtual void fired(unsigned int firemode) override;
51  virtual void JumpFromPlatform(JumpPlatform* platform);
52  virtual void JumpFromSpring(JumpSpring* spring);
53  virtual void CollisionWithEnemy(JumpEnemy* enemy);
54  virtual bool StartRocket(JumpRocket* rocket);
55  virtual void StopRocket(JumpRocket* rocket);
56  virtual bool StartPropeller(JumpPropeller* propeller);
57  virtual void StopPropeller(JumpPropeller* propeller);
58  virtual bool StartBoots(JumpBoots* boots);
59  virtual void StopBoots(JumpBoots* boots);
60  virtual bool StartShield(JumpShield* shield);
61  virtual void StopShield(JumpShield* shield);
62  virtual void InitializeAnimation(Context* context);
63 
64  void setFieldDimension(float width, float height)
65  { fieldWidth_ = width; fieldHeight_ = height; }
66  void setFieldDimension(const Vector2& dimension)
67  { setFieldDimension(dimension.x, dimension.y); }
68  Vector2 getFieldDimension() const
69  { return Vector2(fieldWidth_, fieldHeight_); }
70  void setMouseFactor(const float mouseFactor)
71  { mouseFactor_ = mouseFactor; }
72  const float getMouseFactor() const
73  { return mouseFactor_; }
74  void setModelLeftHand(const std::string& modelLeftHand)
75  { modelLeftHand_ = modelLeftHand; }
77  { return modelLeftHand_; }
78  void setModelRightHand(const std::string& modelRightHand)
79  { modelRightHand_ = modelRightHand; }
81  { return modelRightHand_; }
82  void setRocketPos(const float rocketPos)
83  { rocketPos_ = rocketPos; }
84  const float getRocketPos() const
85  { return rocketPos_; }
86  void setPropellerPos(const float propellerPos)
87  { propellerPos_ = propellerPos; }
88  const float getPropellerPos() const
89  { return propellerPos_; }
90  void setBootsPos(const float bootsPos)
91  { bootsPos_ = bootsPos; }
92  const float getBootsPos() const
93  { return bootsPos_; }
94  void setJumpSpeed(const float jumpSpeed)
95  { jumpSpeed_ = jumpSpeed; }
96  const float getJumpSpeed() const
97  { return jumpSpeed_; }
98  void setRocketSpeed(const float rocketSpeed)
99  { rocketSpeed_ = rocketSpeed; }
100  const float getRocketSpeed() const
101  { return rocketSpeed_; }
102  void setPropellerSpeed(const float propellerSpeed)
103  { propellerSpeed_ = propellerSpeed; }
104  const float getPropellerSpeed() const
105  { return propellerSpeed_; }
106  void setHandMinAngle(const float handMinAngle)
107  { handMinAngle_ = handMinAngle; }
108  const float getHandMinAngle() const
109  { return handMinAngle_; }
110  void setHandMaxAngle(const float handMaxAngle)
111  { handMaxAngle_ = handMaxAngle; }
112  const float getHandMaxAngle() const
113  { return handMaxAngle_; }
114  void setHandSpeed(const float handSpeed)
115  { handSpeed_ = handSpeed; }
116  const float getHandSpeed() const
117  { return handSpeed_; }
118 
120  bool dead_;
121 
126  private:
131  float fieldWidth_;
141  float jumpSpeed_;
142  float handSpeed_;
145  float rocketPos_;
147  float bootsPos_;
150  float handAngle_;
152  bool turnUp_;
155  };
156 }
157 
158 #endif /* _JumpFigure_H__ */
void setModelRightHand(const std::string &modelRightHand)
Definition: JumpFigure.h:78
Model * rightHand_
Definition: JumpFigure.h:130
Definition: JumpFigure.h:37
float timeSinceLastFire_
Definition: JumpFigure.h:133
virtual ~JumpFigure()
Definition: JumpFigure.h:41
JumpPropeller * propellerActive_
Definition: JumpFigure.h:123
#define _JumpExport
Definition: JumpPrereqs.h:60
JumpRocket * rocketActive_
Definition: JumpFigure.h:122
const float getPropellerPos() const
Definition: JumpFigure.h:88
Vector2 getFieldDimension() const
Definition: JumpFigure.h:68
float propellerPos_
Definition: JumpFigure.h:146
void setModelLeftHand(const std::string &modelLeftHand)
Definition: JumpFigure.h:74
std::string modelRightHand_
Definition: JumpFigure.h:128
float handAngle_
Definition: JumpFigure.h:150
JumpBoots * bootsActive_
Definition: JumpFigure.h:124
const float getHandMinAngle() const
Definition: JumpFigure.h:108
::std::string string
Definition: gtest-port.h:756
float propellerSpeed_
Definition: JumpFigure.h:154
void setPropellerPos(const float propellerPos)
Definition: JumpFigure.h:86
bool fireSignal_
Definition: JumpFigure.h:119
const float getRocketPos() const
Definition: JumpFigure.h:84
const float getRocketSpeed() const
Definition: JumpFigure.h:100
float horizontalSpeed_
Definition: JumpFigure.h:149
Model * leftHand_
Definition: JumpFigure.h:129
bool moveDownPressed_
Definition: JumpFigure.h:135
void setFieldDimension(const Vector2 &dimension)
Definition: JumpFigure.h:66
bool moveLeftPressed_
Definition: JumpFigure.h:136
bool turnUp_
Definition: JumpFigure.h:152
void setJumpSpeed(const float jumpSpeed)
Definition: JumpFigure.h:94
float handMinAngle_
Definition: JumpFigure.h:144
Definition: JumpSpring.h:37
bool moveUpPressed_
Definition: JumpFigure.h:134
Definition: JumpPropeller.h:37
Definition: JumpEnemy.h:43
void setRocketSpeed(const float rocketSpeed)
Definition: JumpFigure.h:98
void setHandSpeed(const float handSpeed)
Definition: JumpFigure.h:114
void setRocketPos(const float rocketPos)
Definition: JumpFigure.h:82
Shared library macros, enums, constants and forward declarations for the jump module ...
void setFieldDimension(float width, float height)
Definition: JumpFigure.h:64
void setHandMaxAngle(const float handMaxAngle)
Definition: JumpFigure.h:110
const float getBootsPos() const
Definition: JumpFigure.h:92
xmlelement
Definition: Super.h:519
bool moveRightPressed_
Definition: JumpFigure.h:137
bool firePressed_
Definition: JumpFigure.h:138
const float getMouseFactor() const
Definition: JumpFigure.h:72
Definition: JumpBoots.h:37
const float getJumpSpeed() const
Definition: JumpFigure.h:96
Definition: JumpShield.h:37
bool dead_
Definition: JumpFigure.h:120
const std::string & getModelLeftHand() const
Definition: JumpFigure.h:76
float rocketPos_
Definition: JumpFigure.h:145
Die Wagnis Klasse hat die folgenden Aufgaben:
Definition: ApplicationPaths.cc:66
void setHandMinAngle(const float handMinAngle)
Definition: JumpFigure.h:106
Mode
Definition: CorePrereqs.h:102
void setBootsPos(const float bootsPos)
Definition: JumpFigure.h:90
float gravityAcceleration_
Definition: JumpFigure.h:139
JumpShield * shieldActive_
Definition: JumpFigure.h:125
Definition: JumpRocket.h:37
float handMaxAngle_
Definition: JumpFigure.h:143
float jumpSpeed_
Definition: JumpFigure.h:141
void setPropellerSpeed(const float propellerSpeed)
Definition: JumpFigure.h:102
float maxFireRate_
Definition: JumpFigure.h:148
Definition: Context.h:45
bool animateHands_
Definition: JumpFigure.h:151
float bootsPos_
Definition: JumpFigure.h:147
float fieldHeight_
Definition: JumpFigure.h:132
const float getHandMaxAngle() const
Definition: JumpFigure.h:112
float fieldWidth_
Definition: JumpFigure.h:131
Definition: JumpPlatform.h:43
Definition: Model.h:46
const std::string & getModelRightHand() const
Definition: JumpFigure.h:80
const float getPropellerSpeed() const
Definition: JumpFigure.h:104
float mouseFactor_
Definition: JumpFigure.h:140
float rocketSpeed_
Definition: JumpFigure.h:153
const float getHandSpeed() const
Definition: JumpFigure.h:116
The ControllableEntity is derived from the orxonox::MobileEntity.
Definition: ControllableEntity.h:48
float handSpeed_
Definition: JumpFigure.h:142
std::string modelLeftHand_
Definition: JumpFigure.h:127
void setMouseFactor(const float mouseFactor)
Definition: JumpFigure.h:70