- Timestamp:
- Nov 5, 2014, 4:06:09 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/pickupsFS14/src/modules/jump/JumpCenterpoint.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 JumpCenterpoint.h31 @brief Declaration of the JumpCenterpoint class.32 @ingroup Jump33 */34 28 35 29 #ifndef _JumpCenterpoint_H__ … … 112 106 113 107 For a more elaborate example, have a look at the <code>jump.oxw</code> level file. 114 115 @author 116 Fabian 'x3n' Landau 117 118 @ingroup Jump 108 119 109 */ 120 110 class _JumpExport JumpCenterpoint : public StaticEntity … … 123 113 JumpCenterpoint(Context* context); //!< Constructor. Registers and initializes the object and checks whether the gametype is actually Jump. 124 114 virtual ~JumpCenterpoint() {} 125 126 115 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method to create a JumpCenterpoint through XML. 127 128 virtual void changedGametype(); //!< Is called when the gametype has changed. 129 130 116 virtual void changedGametype(); 131 117 void setPlatformStaticTemplate(const std::string& balltemplate) 132 118 { this->platformStaticTemplate_ = balltemplate; } 133 134 119 const std::string& getPlatformStaticTemplate() const 135 120 { return this->platformStaticTemplate_; } 136 137 121 void setPlatformHMoveTemplate(const std::string& balltemplate) 138 122 { this->platformHMoveTemplate_ = balltemplate; } 139 140 123 const std::string& getPlatformHMoveTemplate() const 141 124 { return this->platformHMoveTemplate_; } 142 143 125 void setPlatformVMoveTemplate(const std::string& balltemplate) 144 126 { this->platformVMoveTemplate_ = balltemplate; } 145 146 127 const std::string& getPlatformVMoveTemplate() const 147 128 { return this->platformVMoveTemplate_; } 148 149 129 void setPlatformDisappearTemplate(const std::string& balltemplate) 150 130 { this->platformDisappearTemplate_ = balltemplate; } 151 152 131 const std::string& getPlatformDisappearTemplate() const 153 132 { return this->platformDisappearTemplate_; } 154 155 133 void setPlatformTimerTemplate(const std::string& balltemplate) 156 134 { this->platformTimerTemplate_ = balltemplate; } 157 158 135 const std::string& getPlatformTimerTemplate() const 159 136 { return this->platformTimerTemplate_; } 160 161 137 void setPlatformFakeTemplate(const std::string& balltemplate) 162 138 { this->platformFakeTemplate_ = balltemplate; } 163 164 139 const std::string& getPlatformFakeTemplate() const 165 140 { return this->platformFakeTemplate_; } 166 167 141 void setProjectileTemplate(const std::string& newTemplate) 168 142 { this->projectileTemplate_ = newTemplate; } 169 170 143 const std::string& getProjectileTemplate() const 171 144 { return this->projectileTemplate_; } 172 173 145 void setSpringTemplate(const std::string& newTemplate) 174 146 { this->springTemplate_ = newTemplate; } 175 176 147 const std::string& getSpringTemplate() const 177 148 { return this->springTemplate_; } 178 179 149 void setRocketTemplate(const std::string& newTemplate) 180 150 { this->rocketTemplate_ = newTemplate; } 181 182 151 const std::string& getRocketTemplate() const 183 152 { return this->rocketTemplate_; } 184 185 153 void setPropellerTemplate(const std::string& newTemplate) 186 154 { this->propellerTemplate_ = newTemplate; } 187 188 155 const std::string& getPropellerTemplate() const 189 156 { return this->propellerTemplate_; } 190 191 157 void setBootsTemplate(const std::string& newTemplate) 192 158 { this->bootsTemplate_ = newTemplate; } 193 194 159 const std::string& getBootsTemplate() const 195 160 { return this->bootsTemplate_; } 196 197 161 void setShieldTemplate(const std::string& newTemplate) 198 162 { this->shieldTemplate_ = newTemplate; } 199 200 163 const std::string& getShieldTemplate() const 201 164 { return this->shieldTemplate_; } 202 203 165 void setFigureTemplate(const std::string& newTemplate) 204 166 { this->figureTemplate_ = newTemplate; } 205 206 167 const std::string& getFigureTemplate() const 207 168 { return this->figureTemplate_; } 208 209 169 void setEnemy1Template(const std::string& newTemplate) 210 170 { this->enemy1Template_ = newTemplate; } 211 212 171 const std::string& getEnemy1Template() const 213 172 { return this->enemy1Template_; } 214 215 173 void setEnemy2Template(const std::string& newTemplate) 216 174 { this->enemy2Template_ = newTemplate; } 217 218 175 const std::string& getEnemy2Template() const 219 176 { return this->enemy2Template_; } 220 221 177 void setEnemy3Template(const std::string& newTemplate) 222 178 { this->enemy3Template_ = newTemplate; } 223 224 179 const std::string& getEnemy3Template() const 225 180 { return this->enemy3Template_; } 226 227 181 void setEnemy4Template(const std::string& newTemplate) 228 182 { this->enemy4Template_ = newTemplate; } 229 230 183 const std::string& getEnemy4Template() const 231 184 { return this->enemy4Template_; } 232 233 234 /**235 @brief Set the dimensions of the playing field.236 @param dimension A vector with the width of the playing field as first component and the height as second.237 */238 185 void setFieldDimension(const Vector2& dimension) 239 186 { this->width_ = dimension.x; this->height_ = dimension.y; } 240 /**241 @brief Get the dimensions of the playing field.242 @return Returns a vector with the width of the playing field as first component and the height as second.243 */244 187 Vector2 getFieldDimension() const 245 188 { return Vector2(this->width_, this->height_); } 246 247 /**248 @brief Set the dimensions of the playing field.249 @param dimension A vector with the width of the playing field as first component and the height as second.250 */251 189 void setSectionLength(const float sectionLength) 252 190 { this->sectionLength_ = sectionLength; } 253 /**254 @brief Get the dimensions of the playing field.255 @return Returns a vector with the width of the playing field as first component and the height as second.256 */257 191 float getSectionLength() const 258 192 { return sectionLength_; } 259 260 193 void setPlatformSpeed(const float platformSpeed) 261 194 { this->platformSpeed_ = platformSpeed; } 262 263 195 float getPlatformSpeed() const 264 196 { return platformSpeed_; } 265 266 197 void setCameraOffset(const float cameraOffset) 267 198 { this->cameraOffset_ = cameraOffset; } 268 269 199 float getCameraOffset() const 270 200 { return cameraOffset_; } 271 272 273 201 private: 274 void checkGametype(); //!< Checks whether the gametype is Jump and if it is, sets its centerpoint. 275 276 std::string platformStaticTemplate_; //!< The template for the ball. 277 std::string platformHMoveTemplate_; //!< The template for the ball. 278 std::string platformVMoveTemplate_; //!< The template for the ball. 279 std::string platformDisappearTemplate_; //!< The template for the ball. 280 std::string platformTimerTemplate_; //!< The template for the ball. 281 std::string platformFakeTemplate_; //!< The template for the ball. 282 std::string projectileTemplate_; //!< The template for the ball. 283 std::string springTemplate_; //!< The template for the ball. 284 std::string rocketTemplate_; //!< The template for the ball. 285 std::string propellerTemplate_; //!< The template for the ball. 286 std::string bootsTemplate_; //!< The template for the ball. 287 std::string shieldTemplate_; //!< The template for the ball. 288 std::string figureTemplate_; //!< The template for the bats. 289 std::string enemy1Template_; //!< The template for the bats. 290 std::string enemy2Template_; //!< The template for the bats. 291 std::string enemy3Template_; //!< The template for the bats. 292 std::string enemy4Template_; //!< The template for the bats. 293 294 float width_; //!< The height of the playing field. 295 float height_; //!< The width of the playing field. 296 float sectionLength_; //!< Height of one section 297 float platformSpeed_; //!< Height of one section 298 float cameraOffset_; //!< Height of one section 202 void checkGametype(); 203 std::string platformStaticTemplate_; 204 std::string platformHMoveTemplate_; 205 std::string platformVMoveTemplate_; 206 std::string platformDisappearTemplate_; 207 std::string platformTimerTemplate_; 208 std::string platformFakeTemplate_; 209 std::string projectileTemplate_; 210 std::string springTemplate_; 211 std::string rocketTemplate_; 212 std::string propellerTemplate_; 213 std::string bootsTemplate_; 214 std::string shieldTemplate_; 215 std::string figureTemplate_; 216 std::string enemy1Template_; 217 std::string enemy2Template_; 218 std::string enemy3Template_; 219 std::string enemy4Template_; 220 float width_; 221 float height_; 222 float sectionLength_; 223 float platformSpeed_; 224 float cameraOffset_; 299 225 }; 300 226 }
Note: See TracChangeset
for help on using the changeset viewer.