Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 28, 2008, 8:30:25 PM (16 years ago)
Author:
rgrieder
Message:
  • Wrote Clock() class: It starts an internal clock when GSRoot starts and gets handed to all GameState ticks as reference. You can then either query the ticked time or the real time (for instance for statistical measurements)
  • general clean up in all the game states
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/gui/src/core/GameState.h

    r1672 r1674  
    4242#include <map>
    4343#include "util/Integers.h"
     44#include "Clock.h"
    4445
    4546namespace orxonox
     
    100101        virtual void enter() = 0;
    101102        virtual void leave() = 0;
    102         virtual void ticked(float dt, uint64_t time) = 0;
     103        virtual void ticked(const Clock& time) = 0;
    103104
    104105        GameState* getActiveChild() { return this->activeChild_; }
    105106
    106         void tickChild(float dt, uint64_t time) { if (this->getActiveChild()) this->getActiveChild()->tick(dt, time); }
     107        void tickChild(const Clock& time) { if (this->getActiveChild()) this->getActiveChild()->tick(time); }
    107108
    108109    private:
     
    113114        void grandchildRemoved(GameState* grandchild);
    114115
    115         void tick(float dt, uint64_t time);
     116        void tick(const Clock& time);
    116117        void activate();
    117118        void deactivate();
Note: See TracChangeset for help on using the changeset viewer.