Changeset 3797 in orxonox.OLD for orxonox/trunk
- Timestamp:
- Apr 13, 2005, 5:11:01 PM (20 years ago)
- Location:
- orxonox/trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/animation.cc
r3796 r3797 38 38 this->postInfinity = postInfinity; 39 39 } 40 41 42 void Anim::play() 43 { 44 this->bRunning = true; 45 } 46 void Anim::stop() 47 { 48 this->rewind(); 49 this->bRunning = false; 50 } 51 void Anim::pause() 52 { 53 this->bRunning = false; 54 } 55 void Anim::replay() 56 { 57 this->rewind(); 58 this->bRunning = true; 59 } -
orxonox/trunk/src/animation.h
r3795 r3797 58 58 void pause(); 59 59 void replay(); 60 // virtual void rewind();60 virtual void rewind() = 0; 61 61 62 62 virtual void tick(float time) = 0; … … 91 91 virtual ~tAnim(); 92 92 93 virtual void rewind(); 94 93 95 void setFuncToAnim(T* object, void (T::*funcToAnim)(float)); 94 96 void addKeyFrame(float value, float duration, ANIM_FUNCTION animFunc = ANIM_LINEAR); 95 97 98 virtual void tick(float time); 96 99 97 100 // animation functions … … 111 114 112 115 113 virtual void tick(float time);114 116 115 117 private: … … 163 165 } 164 166 167 template<class T> 168 void tAnim<T>::rewind(void) 169 { 170 this->currentKeyFrame = keyFrameList->firstElement(); 171 this->nextKeyFrame = keyFrameList->nextElement(keyFrameList->firstElement()); 172 } 165 173 166 174 template<class T>
Note: See TracChangeset
for help on using the changeset viewer.