diff --git a/Script.js b/Script.js index e69de29..06e79fa 100644 --- a/Script.js +++ b/Script.js @@ -0,0 +1,18 @@ +"use strict"; + +var canvasWidth = 1280; +var canvasHeight = 650; +var c = undefined +var ctx = undefined + +window.onload = function () { + init() +} + +function init() { + c = document.getElementById("canvas"); + ctx = c.getContext('2d'); + document.addEventListener('keydown', keyDownPressed, false); + document.addEventListener('keyup', keyUpPressed, false); + gameloop(); +} \ No newline at end of file