Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 4, 2016, 6:19:07 PM (9 years ago)
Author:
landauf
Message:

cleanup in hover module

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentationHS15/src/modules/hover/TimeHUD.cc

    r11026 r11041  
    3434
    3535#include "core/CoreIncludes.h"
    36 #include "core/XMLPort.h"
    3736#include "util/Convert.h"
    3837#include "Hover.h"
     
    4645        RegisterObject(TimeHUD);
    4746
    48         this->_time = 0.0f;
    49         this->_running = false;
    50         this->hoverGame = 0;
     47        this->time_ = 0.0f;
     48        this->running_ = false;
     49        this->hoverGame_ = 0;
    5150        setRunning(true);
    52     }
    53 
    54     void TimeHUD::XMLPort(Element& xmlelement, XMLPort::Mode mode)
    55     {
    56         SUPER(TimeHUD, XMLPort, xmlelement, mode);
    5751    }
    5852
     
    8276        SUPER(TimeHUD, tick, dt);
    8377
    84         if(this->_running) {
    85             this->_time += dt;
     78        if(this->running_) {
     79            this->time_ += dt;
    8680        }
    87         if (this->hoverGame)
     81        if (this->hoverGame_)
    8882        {
    89             this->setCaption(getTimeString(this->_time));
     83            this->setCaption(getTimeString(this->time_));
    9084        }
    91         if(this->hoverGame->getFlags() == 0)
     85        if(this->hoverGame_->getFlags() == 0)
    9286            setRunning(false);
    9387       
     
    10094        if (this->getOwner() && this->getOwner()->getGametype())
    10195        {
    102             this->hoverGame = orxonox_cast<Hover*>(this->getOwner()->getGametype());
     96            this->hoverGame_ = orxonox_cast<Hover*>(this->getOwner()->getGametype());
    10397        }
    10498        else
    10599        {
    106             this->hoverGame = 0;
     100            this->hoverGame_ = 0;
    107101        }
    108     }
    109 
    110     /**
    111     @brief
    112         sets if the clock is running
    113     @param running
    114     */
    115     void TimeHUD::setRunning(bool running)
    116     {
    117         this->_running = running;
    118     }
    119 
    120     /**
    121     @brief
    122         returns if the clock is running
    123     @returns running
    124     */
    125     bool TimeHUD::isRunning() {
    126         return this->_running;
    127102    }
    128103
    129104    void TimeHUD::reset()
    130105    {
    131         this->_time = 0;
     106        this->time_ = 0;
    132107    }
    133108}
Note: See TracChangeset for help on using the changeset viewer.