some UI fixes

This commit is contained in:
biglyderv 2024-11-25 14:14:21 -05:00
parent 371c00b705
commit 4c58e16808
2 changed files with 7 additions and 4 deletions

View file

@ -59,6 +59,8 @@ class Game extends GameBasic {
message = message.join('\n');
console.log(message);
if (!process.env.HOOK) return;
let h = await fetch(
process.env.HOOK,
{

View file

@ -85,7 +85,7 @@ class Game extends GameBasic {
if (ent.type != 'Player') return;
Object.assign(textArgs, [`HP: ${ent.health} PT: ${ent.headCount}`, ent.pos.x, ent.pos.y - 64 / 2]);
Object.assign(textArgs, [`HP: ${ent.health}`, ent.pos.x, ent.pos.y - 64 / 2]);
ctx.strokeText(...textArgs);
ctx.fillText(...textArgs);
@ -107,7 +107,7 @@ class Game extends GameBasic {
ctx.textBaseline = "bottom";
ctx.lineCap = "round";
ctx.lineJoin = "round";
ctx.font = "bold 16px sans-serif";
ctx.font = "bold 32px sans-serif";
ctx.save();
@ -125,7 +125,8 @@ class Game extends GameBasic {
ctx.textAlign = "start";
ctx.textBaseline = "top";
ctx.font = "bold 32px sans-serif";
ctx.font = "bold 48px sans-serif";
ctx.fillStyle = "rgb(0,0,0)";
textArgs = [`XY: ${-Math.round(player.camera.x)}, ${-Math.round(player.camera.y)}`, 25, 25];
ctx.strokeText(...textArgs);
@ -148,7 +149,7 @@ class Game extends GameBasic {
if (player.isMenu) {
let r = Math.floor(Math.abs(player.rot / 1.2) % emojis.length);
ctx.fillText(`Click to react ${emojis[r]}`, cs / 2, cs / 2)
ctx.font = "bold 16px sans-serif";
ctx.font = "bold 32px sans-serif";
ctx.fillText(`Wait for emojis ${emojis.join(', ')}`, cs / 2, cs / 2 + 50)
}
}