Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var x = 0;
- var y = 0;
- var xDirection = 1;
- var yDirection = 1;
- var canvas = null;
- var context2D = null;
- var background = new Image();
- background.src = "bg.gif";
- window.onload = init;
- function init()
- {
- canvas = document.getElementById('canvas');
- context2D = canvas.getContext('2d');
- context2D.drawImage(background,0,0);
- setInterval(loop, 100 / FPS);
- }
- function loop(){
- }
- function eat(){
- }
- function check(){
- }
Add Comment
Please, Sign In to add comment