Changeset 1001 for code/branches/core2/src/orxonox/objects/Tickable.h
- Timestamp:
- Apr 8, 2008, 1:51:25 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core2/src/orxonox/objects/Tickable.h
r871 r1001 50 50 class TickFrameListener; // Forward declaration 51 51 52 void slomo(float factor); 53 void setTimeFactor(float factor = 1.0); 54 float getTimeFactor(); 55 52 56 //! The Tickable interface provides a tick(dt) function, that gets called every frame. 53 57 class _OrxonoxExport Tickable : virtual public OrxonoxClass … … 71 75 bool frameStarted(const Ogre::FrameEvent &evt) 72 76 { 77 float dt = evt.timeSinceLastFrame * getTimeFactor(); 73 78 // Iterate through all Tickables and call their tick(dt) function 74 79 for (Iterator<Tickable> it = ObjectList<Tickable>::start(); it; ) 75 (it++)->tick( evt.timeSinceLastFrame);80 (it++)->tick(dt); 76 81 77 82 return FrameListener::frameStarted(evt);
Note: See TracChangeset
for help on using the changeset viewer.