authoritative server OK
+ TODO actual matchmaking
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user