Advertisement
Guest User

Untitled

a guest
May 22nd, 2015
242
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function drawSuper() {
  2.     setTimeout(function(){
  3.         requestAnimationFrame(drawSuper)
  4.    
  5.         ctx.clearRect(0, 0, ctx.canvas.width, ctx.canvas.height);
  6.  
  7.         if (i % 2 === 0) {
  8.             drawSuperMarioOne();
  9.         } else {
  10.             drawSuperMarioTwo();
  11.         }
  12.         i++;
  13.     }, 1000/5)
  14. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement