diff --git a/Script.js b/Script.js index 06e79fa..3d606b0 100644 --- a/Script.js +++ b/Script.js @@ -14,5 +14,28 @@ function init() { ctx = c.getContext('2d'); document.addEventListener('keydown', keyDownPressed, false); document.addEventListener('keyup', keyUpPressed, false); - gameloop(); + gameLoop(); +} + +function keyDownPressed(e){ + +} + +function keyDownPressed(e){ + +} + +function clearGame(){ + ctx.save(); + ctx.fillStyle = 'white'; + ctx.fillReact(100, 100, 100, 100); + ctx.fill(); + ctx.restore(); +} + +function gameLoop(timestamp){ + clearGame(); + updateGame(); + drawGame(); + window.requestAnimationFrame(gameLoop); } \ No newline at end of file