Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 30, 2017, 2:42:31 PM (7 years ago)
Author:
jkindle
Message:

Works whoow

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/SuperOrxoBros_FS17/src/modules/superorxobros/SOBCenterpoint.cc

    r11379 r11381  
    2121 *
    2222 *   Author:
    23  *      Fabian 'x3n' Landau
     23 *      Fabien Vultier
    2424 *   Co-authors:
    2525 *      ...
     
    2828
    2929/**
    30     @file PongCenterpoint.cc
    31     @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.
    3232*/
    3333
     
    3636#include "core/CoreIncludes.h"
    3737#include "core/XMLPort.h"
    38 
    3938#include "SOB.h"
    4039
     
    4342    RegisterClass(SOBCenterpoint);
    4443
    45     /**
    46     @brief
    47         Constructor. Registers and initializes the object and checks whether the gametype is actually Pong.
    48     */
    4944    SOBCenterpoint::SOBCenterpoint(Context* context) : StaticEntity(context)
    5045    {
    5146        RegisterObject(SOBCenterpoint);
    5247
     48     
    5349
    54         this->checkGametype();
     50        checkGametype();
    5551    }
    5652
    57     /**
    58     @brief
    59         Method to create a PongCenterpoint through XML.
    60     */
    6153    void SOBCenterpoint::XMLPort(Element& xmlelement, XMLPort::Mode mode)
    6254    {
    6355        SUPER(SOBCenterpoint, XMLPort, xmlelement, mode);
    6456
    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       
    7262    }
    7363
    74     /**
    75     @brief
    76         Checks whether the gametype is Pong and if it is, sets its centerpoint.
    77     */
    7864    void SOBCenterpoint::checkGametype()
    7965    {
    80         if (this->getGametype() != nullptr && this->getGametype()->isA(Class(SOB)))
     66        if (getGametype() != nullptr && this->getGametype()->isA(Class(SOB)))
    8167        {
    8268            SOB* SOBGametype = orxonox_cast<SOB*>(this->getGametype());
Note: See TracChangeset for help on using the changeset viewer.