Changeset 3786 in orxonox.OLD for orxonox/branches/textEngine/src/animation.h
- Timestamp:
- Apr 13, 2005, 2:17:16 AM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/textEngine/src/animation.h
r3785 r3786 66 66 67 67 // animation functions 68 float random(float time ) const;69 float constant(float time ) const;70 float linear(float time ) const;71 float sine(float time ) const;68 float random(float timePassed) const; 69 float constant(float timePassed) const; 70 float linear(float timePassed) const; 71 float sine(float timePassed) const; 72 72 73 73 … … 79 79 80 80 bool bHasKeys; 81 bool bPlay; 81 82 83 float localTime; 82 84 AnimKeyFrame* currentKeyFrame; 83 85 AnimKeyFrame* nextKeyFrame; … … 137 139 void Animation<T>::tick(float time) 138 140 { 139 (this->object->*(funcToAnim))((this->*animFunc)(time)); 141 this->localTime += time; 142 if (localTime >= this->currentKeyFrame->duration) 143 { 144 this->localTime = 0; 145 this->currentKeyFrame = this->keyFrameList->nextElement(this->currentKeyFrame); 146 this->nextKeyFrame = this->keyFrameList->nextElement(this->nextKeyFrame); 147 printf("%p from:%f to:%f\n", this->currentKeyFrame,this->currentKeyFrame->value, this->nextKeyFrame->value); 148 149 150 } 151 152 (this->object->*(funcToAnim))((this->*animFunc)(this->localTime)); 140 153 } 141 154
Note: See TracChangeset
for help on using the changeset viewer.