Guest User

Untitled

a guest
Jul 21st, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. var x = 0;
  2. var y = 0;
  3. var xDirection = 1;
  4. var yDirection = 1;
  5. var canvas = null;
  6. var context2D = null;
  7. var background = new Image();
  8. background.src = "bg.gif";
  9.  
  10. window.onload = init;
  11.  
  12. function init()
  13. {
  14. canvas = document.getElementById('canvas');
  15. context2D = canvas.getContext('2d');
  16. context2D.drawImage(background,0,0);
  17. setInterval(loop, 100 / FPS);
  18. }
  19.  
  20. function loop(){
  21.  
  22. }
  23.  
  24.  
  25. function eat(){
  26.  
  27. }
  28.  
  29. function check(){
  30.  
  31. }
Add Comment
Please, Sign In to add comment