Advertisement
Lucassim

Untitled

Apr 10th, 2013
290
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.44 KB | None | 0 0
  1. timeSinceLastAnimation = timer.getTimeSinceLastAnimation();
  2.  
  3.     //Apply delay
  4.     if (currentClip < this->nClips && timeSinceLastAnimation >= delay * 1000) {
  5.         //Apply FPS cap
  6.         if (animationRateTimer.getTimeSinceLastAnimation() >= 1000 / fps) {
  7.             currentClip++;
  8.             animationRateTimer.start();
  9.         }
  10.     } else {
  11.         if ((timeSinceLastAnimation >= delay * 1000)) {
  12.             timer.start();
  13.             currentRepeat = 0;
  14.         }
  15.         currentClip = 0;
  16.         currentRepeat++;
  17.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement