Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (e.keyCode == 38) {
- //up
- drawsprite('b1');
- function moveu(bottom,timer){
- if(bottom == 2){
- drawsprite('b2');
- }
- if(bottom == 4){
- drawsprite('b1');
- clearTimeout(timer);
- return false;
- }
- bottom += 1;
- ctx.mytranslate(0, 4);
- var timer = setTimeout(function(){ moveu(bottom,timer) },50);
- }
- moveu(0);
- return false;
- }
Advertisement
Add Comment
Please, Sign In to add comment