drawing now seperate from gameLoop

+ refactoring
+ added soundMutedFlag
This commit is contained in:
LuckyLaszlo
2022-11-24 13:56:51 +01:00
parent 7d5895a6cc
commit 3474d54a2b
22 changed files with 105 additions and 106 deletions

View File

@@ -1,5 +1,5 @@
import {gc} from "./global.js";
import * as d from "./draw.js";
import { gc } from "./global.js";
let actual_time: number = Date.now();
let last_time: number;
@@ -18,8 +18,6 @@ function gameLoop()
// client prediction
gc.ball.moveAndBounce(delta_time, [gc.wallTop, gc.wallBottom, gc.playerLeft, gc.playerRight]);
d.draw();
}
export {gameLoop}