Update JS
This commit is contained in:
parent
ae9a226bb9
commit
6d84240c67
28
Script.js
28
Script.js
@ -5,6 +5,14 @@ var canvasHeight = 650;
|
||||
var c = undefined
|
||||
var ctx = undefined
|
||||
|
||||
var game = {
|
||||
level: 1,
|
||||
speed: 1,
|
||||
gameOver: false,
|
||||
frames: 0,
|
||||
timer: 0,
|
||||
}
|
||||
|
||||
window.onload = function () {
|
||||
init()
|
||||
}
|
||||
@ -21,16 +29,22 @@ function keyDownPressed(e){
|
||||
|
||||
}
|
||||
|
||||
function keyDownPressed(e){
|
||||
function keyUpPressed(e){
|
||||
|
||||
}
|
||||
|
||||
function clearGame(){
|
||||
ctx.save();
|
||||
ctx.fillStyle = 'white';
|
||||
ctx.fillReact(100, 100, 100, 100);
|
||||
ctx.fill();
|
||||
ctx.restore();
|
||||
function clearGame() {
|
||||
ctx.clearRect(0, 0, canvasWidth, canvasHeight);
|
||||
}
|
||||
|
||||
function updateGame() {
|
||||
|
||||
|
||||
game.frames++;
|
||||
}
|
||||
|
||||
function drawGame() {
|
||||
|
||||
}
|
||||
|
||||
function gameLoop(timestamp){
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user