Changeset 1271
- Timestamp:
- May 14, 2008, 11:26:34 AM (17 years ago)
- Location:
- code/branches/input/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/input/src/core/InputBuffer.h
r1259 r1271 43 43 {}; 44 44 45 class _CoreExport InputBuffer : public KeyHandler, public Tickable 45 class _CoreExport InputBuffer : public KeyHandler, public TickableReal 46 46 { 47 47 struct InputBufferListenerTuple -
code/branches/input/src/core/InputManager.h
r1259 r1271 51 51 */ 52 52 class _CoreExport InputManager 53 : public Tickable ,53 : public TickableReal, 54 54 public OIS::KeyListener, public OIS::MouseListener, public OIS::JoyStickListener 55 55 { -
code/branches/input/src/core/Tickable.cc
r1062 r1271 40 40 RegisterRootObject(Tickable); 41 41 } 42 43 /** 44 @brief Constructor: Registers the object in the TickableReal-list 45 */ 46 TickableReal::TickableReal() 47 { 48 RegisterRootObject(TickableReal); 49 } 42 50 } -
code/branches/input/src/core/Tickable.h
r1062 r1271 62 62 }; 63 63 64 //! The Tickable interface provides a tick(dt) function, that gets called every frame. 65 class _CoreExport TickableReal : virtual public OrxonoxClass 66 { 67 public: 68 /** 69 @brief Gets called every frame. 70 @param dt The time since the last frame in seconds 71 */ 72 virtual void tick(float dt) = 0; 73 74 protected: 75 TickableReal(); 76 }; 77 64 78 } 65 79 -
code/branches/input/src/orxonox/Orxonox.cc
r1259 r1271 490 490 for (Iterator<Tickable> it = ObjectList<Tickable>::start(); it; ++it) 491 491 it->tick((float)evt.timeSinceLastFrame * this->timefactor_); 492 orxonoxConsole_->tick((float)evt.timeSinceLastFrame * this->timefactor_); 492 // Iterate through all TickableReals and call their tick(dt) function 493 for (Iterator<TickableReal> it = ObjectList<TickableReal>::start(); it; ++it) 494 it->tick((float)evt.timeSinceLastFrame); 495 orxonoxConsole_->tick((float)evt.timeSinceLastFrame); 493 496 494 497 // don't forget to call _fireFrameStarted in ogre to make sure
Note: See TracChangeset
for help on using the changeset viewer.