trevor403

Untitled

Jun 18th, 2013
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if (e.keyCode == 38) {
  2.        //up
  3.        drawsprite('b1');
  4.        function moveu(bottom,timer){
  5.             if(bottom == 2){
  6.                 drawsprite('b2');
  7.             }
  8.             if(bottom == 4){
  9.                 drawsprite('b1');      
  10.                 clearTimeout(timer);
  11.                 return false;
  12.             }
  13.             bottom += 1;
  14.             ctx.mytranslate(0, 4);
  15.             var timer = setTimeout(function(){ moveu(bottom,timer) },50);
  16.        }
  17.        moveu(0);
  18.        return false;
  19.     }
Advertisement
Add Comment
Please, Sign In to add comment