Created
February 17, 2013 20:37
-
-
Save basicallydan/4973324 to your computer and use it in GitHub Desktop.
An excerpt of how the original SkiFree port that I created looked, in essence.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var skier; | |
var trees = []; | |
var mouseX = getCentreOfViewport(); | |
var mouseY = mainCanvas.height; | |
dContext.getLoadedImage = function (imgPath) { | |
if (images[imgPath]) { | |
return images[imgPath]; | |
} | |
}; | |
skier = new Skier(sprites.skier); | |
tree = new Sprite(sprites.smallTree); | |
skier.setPosition(mouseX, getMiddleOfViewport()); | |
setInterval(function () { | |
// Draw the bastards | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment