void CreatureAnimation::runAnimation(float timepassed) { mVecRotPos.clear(); if(mAnimate > 0) { //Add the amount of time passed to time //Handle the animation transforms dependent on time //Handle the shapes dependent on animation transforms mTime += timepassed; if(mTime >= mStopTime) { mAnimate--; //std::cout << "Stopping the animation\n"; if(mAnimate == 0) mTime = mStopTime; else mTime = mStartTime + (mTime - mStopTime); } handleAnimationTransforms(); handleShapes(mShapes, mBase, mBase->getSkeleton()); } }
void CreatureAnimation::runAnimation(float timepassed){ vecRotPos.clear(); if(animate > 0){ //Add the amount of time passed to time //Handle the animation transforms dependent on time //Handle the shapes dependent on animation transforms time += timepassed; if(time >= stopTime){ animate--; //std::cout << "Stopping the animation\n"; if(animate == 0) time = stopTime; else time = startTime + (time - stopTime); } handleAnimationTransforms(); handleShapes(shapes, base, base->getSkeleton()); } }