- Timestamp:
- Mar 30, 2017, 2:42:31 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/SuperOrxoBros_FS17/src/modules/superorxobros/SOBCenterpoint.cc
r11379 r11381 21 21 * 22 22 * Author: 23 * Fabi an 'x3n' Landau23 * Fabien Vultier 24 24 * Co-authors: 25 25 * ... … … 28 28 29 29 /** 30 @file PongCenterpoint.cc31 @brief Implementation of the PongCenterpoint class.30 @file SOBCenterpoint.cc 31 @brief The SOBCenterpoint is a StaticEntity which represents the level of the minigame. All platforms, enemies and items are attached to the SOBCenterpoint. 32 32 */ 33 33 … … 36 36 #include "core/CoreIncludes.h" 37 37 #include "core/XMLPort.h" 38 39 38 #include "SOB.h" 40 39 … … 43 42 RegisterClass(SOBCenterpoint); 44 43 45 /**46 @brief47 Constructor. Registers and initializes the object and checks whether the gametype is actually Pong.48 */49 44 SOBCenterpoint::SOBCenterpoint(Context* context) : StaticEntity(context) 50 45 { 51 46 RegisterObject(SOBCenterpoint); 52 47 48 53 49 54 this->checkGametype();50 checkGametype(); 55 51 } 56 52 57 /**58 @brief59 Method to create a PongCenterpoint through XML.60 */61 53 void SOBCenterpoint::XMLPort(Element& xmlelement, XMLPort::Mode mode) 62 54 { 63 55 SUPER(SOBCenterpoint, XMLPort, xmlelement, mode); 64 56 65 //XMLPortParam(SOBCenterpoint, "dimension", setFieldDimension, getFieldDimension, xmlelement, mode); 66 //XMLPortParam(SOBCenterpoint, "balltemplate", setBalltemplate, getBalltemplate, xmlelement, mode); 67 // XMLPortParam(SOBCenterpoint, "battemplate", setBattemplate, getBattemplate, xmlelement, mode); 68 // XMLPortParam(SOBCenterpoint, "ballspeed", setBallSpeed, getBallSpeed, xmlelement, mode); 69 // XMLPortParam(SOBCenterpoint, "ballaccfactor", setBallAccelerationFactor, getBallAccelerationFactor, xmlelement, mode); 70 // XMLPortParam(SOBCenterpoint, "batspeed", setBatSpeed, getBatSpeed, xmlelement, mode); 71 // XMLPortParam(SOBCenterpoint, "batlength", setBatLength, getBatLength, xmlelement, mode); 57 58 XMLPortParam(SOBCenterpoint, "cameraOffset", setCameraOffset, getCameraOffset, xmlelement, mode); 59 60 XMLPortParam(SOBCenterpoint, "figureTemplate", setFigureTemplate, getFigureTemplate, xmlelement, mode); 61 72 62 } 73 63 74 /**75 @brief76 Checks whether the gametype is Pong and if it is, sets its centerpoint.77 */78 64 void SOBCenterpoint::checkGametype() 79 65 { 80 if ( this->getGametype() != nullptr && this->getGametype()->isA(Class(SOB)))66 if (getGametype() != nullptr && this->getGametype()->isA(Class(SOB))) 81 67 { 82 68 SOB* SOBGametype = orxonox_cast<SOB*>(this->getGametype());
Note: See TracChangeset
for help on using the changeset viewer.