- 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.cc
r10074 r10111 21 21 * 22 22 * Author: 23 * Fabi an 'x3n' Landau23 * Fabien Vultier 24 24 * Co-authors: 25 25 * ... … … 29 29 /** 30 30 @file JumpCenterpoint.cc 31 @brief Implementation of the JumpCenterpoint class.31 @brief The JumpCenterpoint is a StaticEntity which represents the level of the minigame. All platforms, enemies and items are attached to the JumpCenterpoint. 32 32 */ 33 33 34 34 #include "JumpCenterpoint.h" 35 36 35 #include "core/CoreIncludes.h" 37 36 #include "core/XMLPort.h" 38 39 37 #include "Jump.h" 40 38 … … 43 41 RegisterClass(JumpCenterpoint); 44 42 45 /**46 @brief47 Constructor. Registers and initializes the object and checks whether the gametype is actually Jump.48 */49 43 JumpCenterpoint::JumpCenterpoint(Context* context) : StaticEntity(context) 50 44 { 51 45 RegisterObject(JumpCenterpoint); 52 46 53 // Variablen hier veraendern nuetzt nichts! Diese Variablen koennen in Level-File initialisiert werden. 54 width_ = 200; 55 height_ = 120; 56 sectionLength_ = 120; 57 platformSpeed_ = 20.0; 47 width_ = 0.0; 48 height_ = 0.0; 49 sectionLength_ = 0.0; 50 platformSpeed_ = 0.0; 58 51 59 52 checkGametype(); 60 53 } 61 54 62 /**63 @brief64 Method to create a JumpCenterpoint through XML.65 */66 55 void JumpCenterpoint::XMLPort(Element& xmlelement, XMLPort::Mode mode) 67 56 { … … 91 80 } 92 81 93 /**94 @brief95 Is called when the gametype has changed.96 */97 82 void JumpCenterpoint::changedGametype() 98 83 { 99 84 SUPER(JumpCenterpoint, changedGametype); 100 85 101 // Check, whether it's still Jump.102 86 checkGametype(); 103 87 } 104 88 105 /**106 @brief107 Checks whether the gametype is Jump and if it is, sets its centerpoint.108 */109 89 void JumpCenterpoint::checkGametype() 110 90 { 111 if ( this->getGametype() != NULL && this->getGametype()->isA(Class(Jump)))91 if (getGametype() != NULL && this->getGametype()->isA(Class(Jump))) 112 92 { 113 93 Jump* jumpGametype = orxonox_cast<Jump*>(this->getGametype().get());
Note: See TracChangeset
for help on using the changeset viewer.