Guest User

Untitled

a guest
Oct 21st, 2016
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. var game = (function () {
  2.  
  3. // Global vars
  4. var canvas,
  5. canvasCtx;
  6. // And so on...
  7.  
  8. // Private methods
  9. function loop() {
  10. update();
  11. draw();
  12. }
  13.  
  14. function update() {
  15. }
  16.  
  17. function draw() {
  18. ctx.drawImage(buffer, 0, 0);
  19. }
  20.  
  21. function init() {
  22. // Marvelous code...
  23. }
  24.  
  25.  
  26. // Public Methods
  27. return {
  28. init: init
  29. }
  30. })();
Add Comment
Please, Sign In to add comment