messages draw on canvas

+ bugfix: vector.assign() Uncaught TypeError
This commit is contained in:
LuckyLaszlo
2022-11-28 04:40:03 +01:00
parent 7f248b5449
commit 5325c8b9ee
7 changed files with 48 additions and 27 deletions

View File

@@ -27,6 +27,7 @@ class GameComponentsClient extends GameComponentsExtensionForClient {
midLine: Line;
scoreLeft: TextNumericValue;
scoreRight: TextNumericValue;
text1: TextElem;
w_grid_mid: RectangleClient;
w_grid_u1: RectangleClient;
@@ -45,6 +46,10 @@ class GameComponentsClient extends GameComponentsExtensionForClient {
this.scoreRight = new TextNumericValue(pos, c.scoreSize, ctx, "white");
this.scoreLeft.value = 0;
this.scoreRight.value = 0;
// Text
pos.assign(0, c.h_mid);
this.text1 = new TextElem(pos, Math.floor(c.w/8), ctx, "white");
// Dotted Midline
pos.assign(c.w_mid-c.midLineSize/2, 0+c.wallSize);