Changeset 10111 for code/branches/pickupsFS14/src/modules/jump/JumpFigure.h
- Timestamp:
- Nov 5, 2014, 4:06:09 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/pickupsFS14/src/modules/jump/JumpFigure.h
r10074 r10111 21 21 * 22 22 * Author: 23 * Fabi an 'x3n' Landau23 * Fabien Vultier 24 24 * Co-authors: 25 25 * ... 26 26 * 27 27 */ 28 29 /**30 @file JumpFigure.h31 @brief Declaration of the JumpFigure class.32 @ingroup Jump33 */34 28 35 29 #ifndef _JumpFigure_H__ … … 42 36 namespace orxonox 43 37 { 44 45 /**46 @brief47 The JumpFigure class manages the bats for @ref orxonox::Jump "Jump", which are the elements controlled by the players.48 49 It is responsible for the movement (controlled by the players) of the bat.50 51 @author52 Fabian 'x3n' Landau53 54 @ingroup Jump55 */56 38 class _JumpExport JumpFigure : public ControllableEntity 57 39 { … … 59 41 JumpFigure(Context* context); //!< Constructor. Registers and initializes the object. 60 42 virtual ~JumpFigure() {} 61 62 43 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); 63 64 44 virtual void tick(float dt); 65 66 45 virtual void moveFrontBack(const Vector2& value); //!< Overloaded the function to steer the bat up and down. 67 46 virtual void moveRightLeft(const Vector2& value); //!< Overloaded the function to steer the bat up and down. 68 69 47 virtual void rotateYaw(const Vector2& value); 70 48 virtual void rotatePitch(const Vector2& value); 71 49 virtual void rotateRoll(const Vector2& value); 72 73 50 void fire(unsigned int firemode); 74 51 virtual void fired(unsigned int firemode); 75 76 52 virtual void JumpFromPlatform(JumpPlatform* platform); 77 53 virtual void JumpFromSpring(JumpSpring* spring); … … 85 61 virtual bool StartShield(JumpShield* shield); 86 62 virtual void StopShield(JumpShield* shield); 87 88 63 virtual void InitializeAnimation(Context* context); 89 64 90 65 void setFieldDimension(float width, float height) 91 66 { fieldWidth_ = width; fieldHeight_ = height; } 92 93 67 void setFieldDimension(const Vector2& dimension) 94 68 { setFieldDimension(dimension.x, dimension.y); } 95 96 69 Vector2 getFieldDimension() const 97 70 { return Vector2(fieldWidth_, fieldHeight_); } 98 99 71 void setMouseFactor(const float mouseFactor) 100 72 { mouseFactor_ = mouseFactor; } 101 102 73 const float getMouseFactor() const 103 74 { return mouseFactor_; } 104 105 75 void setModelLeftHand(const std::string& modelLeftHand) 106 76 { modelLeftHand_ = modelLeftHand; } 107 108 77 const std::string& getModelLeftHand() const 109 78 { return modelLeftHand_; } 110 111 79 void setModelRightHand(const std::string& modelRightHand) 112 80 { modelRightHand_ = modelRightHand; } 113 114 81 const std::string& getModelRightHand() const 115 82 { return modelRightHand_; } 116 117 83 void setRocketPos(const float rocketPos) 118 84 { rocketPos_ = rocketPos; } 119 120 85 const float getRocketPos() const 121 86 { return rocketPos_; } 122 123 87 void setPropellerPos(const float propellerPos) 124 88 { propellerPos_ = propellerPos; } 125 126 89 const float getPropellerPos() const 127 90 { return propellerPos_; } 128 129 91 void setBootsPos(const float bootsPos) 130 92 { bootsPos_ = bootsPos; } 131 132 93 const float getBootsPos() const 133 94 { return bootsPos_; } 134 135 95 void setJumpSpeed(const float jumpSpeed) 136 96 { jumpSpeed_ = jumpSpeed; } 137 138 97 const float getJumpSpeed() const 139 98 { return jumpSpeed_; } 140 141 99 void setRocketSpeed(const float rocketSpeed) 142 100 { rocketSpeed_ = rocketSpeed; } 143 144 101 const float getRocketSpeed() const 145 102 { return rocketSpeed_; } 146 147 103 void setPropellerSpeed(const float propellerSpeed) 148 104 { propellerSpeed_ = propellerSpeed; } 149 150 105 const float getPropellerSpeed() const 151 106 { return propellerSpeed_; } 152 153 107 void setHandMinAngle(const float handMinAngle) 154 108 { handMinAngle_ = handMinAngle; } 155 156 109 const float getHandMinAngle() const 157 110 { return handMinAngle_; } 158 159 111 void setHandMaxAngle(const float handMaxAngle) 160 112 { handMaxAngle_ = handMaxAngle; } 161 162 113 const float getHandMaxAngle() const 163 114 { return handMaxAngle_; } 164 165 115 void setHandSpeed(const float handSpeed) 166 116 { handSpeed_ = handSpeed; } 167 168 117 const float getHandSpeed() const 169 118 { return handSpeed_; } 170 119 171 bool fireSignal; 120 bool fireSignal_; 121 bool rocketActive_; 122 bool propellerActive_; 172 123 bool dead_; 173 174 124 private: 175 125 std::string modelLeftHand_; 176 126 std::string modelRightHand_; 177 178 127 Model* leftHand_; 179 128 Model* rightHand_; 180 181 129 float fieldWidth_; 182 130 float fieldHeight_; 183 float timeSinceLastFire; 184 185 bool moveUpPressed; 186 bool moveDownPressed; 187 bool moveLeftPressed; 188 bool moveRightPressed; 189 bool firePressed; 190 191 float gravityAcceleration; 131 float timeSinceLastFire_; 132 bool moveUpPressed_; 133 bool moveDownPressed_; 134 bool moveLeftPressed_; 135 bool moveRightPressed_; 136 bool firePressed_; 137 float gravityAcceleration_; 192 138 float mouseFactor_; 193 194 139 float jumpSpeed_; 195 140 float handSpeed_; … … 199 144 float propellerPos_; 200 145 float bootsPos_; 201 float maxFireRate; 202 203 float horizontalSpeed; 204 146 float maxFireRate_; 147 float horizontalSpeed_; 205 148 float handAngle_; 206 149 bool animateHands_; 207 150 bool turnUp_; 208 209 bool rocketActive_;210 bool propellerActive_;211 151 bool bootsActive_; 212 152 bool shieldActive_;
Note: See TracChangeset
for help on using the changeset viewer.