Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 27, 2008, 8:07:29 AM (16 years ago)
Author:
rgrieder
Message:

updated input branch

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/input/src/orxonox/tools/Timer.h

    r1535 r1629  
    7878
    7979            void run() const;
     80            void deleteExecutor();
    8081
    8182            /** @brief Starts the Timer: Function-call after 'interval' seconds. */
     
    9495            inline bool isActive() const
    9596                { return this->bActive_; }
     97            /** @brief Returns the remaining time until the Timer calls the function. @return The remaining time */
     98            inline float getRemainingTime() const
     99                { return this->time_; }
    96100            /** @brief Gives the Timer some extra time. @param time The amount of extra time in seconds */
    97101            inline void addTime(float time)
     
    149153            void setTimer(float interval, bool bLoop, T* object, ExecutorMember<T>* executor)
    150154            {
     155                this->deleteExecutor();
     156
    151157                this->interval_ = interval;
    152158                this->bLoop_ = bLoop;
     
    185191            void setTimer(float interval, bool bLoop, ExecutorStatic* executor)
    186192            {
     193                this->deleteExecutor();
     194
    187195                this->interval_ = interval;
    188196                this->bLoop_ = bLoop;
Note: See TracChangeset for help on using the changeset viewer.