SHARE
TWEET

Untitled

a guest Jan 14th, 2013 10 Never
  1. var timerInterval = setInterval(drawPlayerRunning, 50);
  2.   clearInterval(timerInterval);
  3.        
  4. var isIntervalInProgress = false;
  5. setInterval(function()
  6. {
  7.   if ( isIntervalInProgress )
  8.     return false;
  9.  
  10.   isIntervalInProgress = true;
  11.  
  12.   drawPlayerRunning();
  13.  
  14.   isIntervalInProgress = false;
  15.  
  16. }, 50);
  17.        
  18. var func = function()
  19. {
  20.   setTimeout(function()
  21.   {
  22.     drawPlayerRunning();
  23.     func();
  24.   }, 50)
  25. }
RAW Paste Data
Top