authoritative server OK

+ TODO actual matchmaking
This commit is contained in:
LuckyLaszlo
2022-11-21 19:46:25 +01:00
parent 48665cfe30
commit add08c216f
20 changed files with 485 additions and 240 deletions

View File

@@ -10,11 +10,13 @@ class TextElem implements Component {
size: number;
font: string;
text: string = "";
constructor(ctx: CanvasRenderingContext2D, pos: VectorInteger, color: string, size: number, font: string = "Bit5x3") {
this.ctx = ctx;
constructor(pos: VectorInteger, size: number,
ctx: CanvasRenderingContext2D, color: string, font: string = "Bit5x3")
{
this.pos = Object.assign({}, pos);
this.color = color;
this.size = size;
this.ctx = ctx;
this.color = color;
this.font = font;
}
update() {
@@ -38,8 +40,10 @@ class TextElem implements Component {
class TextNumericValue extends TextElem {
private _value: number = 0;
constructor(ctx: CanvasRenderingContext2D, pos: VectorInteger, color: string, size: number, font?: string) {
super(ctx, pos, color, size, font);
constructor(pos: VectorInteger, size: number,
ctx: CanvasRenderingContext2D, color: string, font?: string)
{
super(pos, size, ctx, color, font);
}
get value() {
return this._value;