Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var game = (function () {
- // Global vars
- var canvas,
- canvasCtx;
- // And so on...
- // Private methods
- function loop() {
- update();
- draw();
- }
- function update() {
- }
- function draw() {
- ctx.drawImage(buffer, 0, 0);
- }
- function init() {
- // Marvelous code...
- }
- // Public Methods
- return {
- init: init
- }
- })();
Add Comment
Please, Sign In to add comment