Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 5, 2014, 4:06:09 PM (9 years ago)
Author:
fvultier
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/pickupsFS14/src/modules/jump/JumpCenterpoint.cc

    r10074 r10111  
    2121 *
    2222 *   Author:
    23  *      Fabian 'x3n' Landau
     23 *      Fabien Vultier
    2424 *   Co-authors:
    2525 *      ...
     
    2929/**
    3030    @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.
    3232*/
    3333
    3434#include "JumpCenterpoint.h"
    35 
    3635#include "core/CoreIncludes.h"
    3736#include "core/XMLPort.h"
    38 
    3937#include "Jump.h"
    4038
     
    4341    RegisterClass(JumpCenterpoint);
    4442
    45     /**
    46     @brief
    47         Constructor. Registers and initializes the object and checks whether the gametype is actually Jump.
    48     */
    4943    JumpCenterpoint::JumpCenterpoint(Context* context) : StaticEntity(context)
    5044    {
    5145        RegisterObject(JumpCenterpoint);
    5246
    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;
    5851
    5952        checkGametype();
    6053    }
    6154
    62     /**
    63     @brief
    64         Method to create a JumpCenterpoint through XML.
    65     */
    6655    void JumpCenterpoint::XMLPort(Element& xmlelement, XMLPort::Mode mode)
    6756    {
     
    9180    }
    9281
    93     /**
    94     @brief
    95         Is called when the gametype has changed.
    96     */
    9782    void JumpCenterpoint::changedGametype()
    9883    {
    9984        SUPER(JumpCenterpoint, changedGametype);
    10085
    101         // Check, whether it's still Jump.
    10286        checkGametype();
    10387    }
    10488
    105     /**
    106     @brief
    107         Checks whether the gametype is Jump and if it is, sets its centerpoint.
    108     */
    10989    void JumpCenterpoint::checkGametype()
    11090    {
    111         if (this->getGametype() != NULL && this->getGametype()->isA(Class(Jump)))
     91        if (getGametype() != NULL && this->getGametype()->isA(Class(Jump)))
    11292        {
    11393            Jump* jumpGametype = orxonox_cast<Jump*>(this->getGametype().get());
Note: See TracChangeset for help on using the changeset viewer.