server reconciliation OK (a little rubberbanding)

This commit is contained in:
LuckyLaszlo
2022-11-23 10:43:12 +01:00
parent 2b9058ad49
commit 7d5895a6cc
10 changed files with 110 additions and 33 deletions

View File

@@ -2,12 +2,12 @@
import * as c from ".././constants.js"
class GameArea {
keys: string[];
interval: number = 0;
keys: string[] = [];
handleInputInterval: number = 0;
gameLoopInterval: number = 0;
canvas: HTMLCanvasElement;
ctx: CanvasRenderingContext2D;
constructor() {
this.keys = [];
this.canvas = document.createElement("canvas");
this.ctx = this.canvas.getContext("2d") as CanvasRenderingContext2D;
this.canvas.width = c.CanvasWidth;