Update JS
This commit is contained in:
parent
d326cbadb0
commit
d4495e4189
18
Script.js
18
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();
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user