This commit is contained in:
biglyderv 2024-11-25 14:14:20 -05:00
parent 37b516faee
commit 03bb36be88

View file

@ -122,7 +122,9 @@ class Game extends GameBasic {
let { player } = this; let { player } = this;
if (player.health <= 0) { if (player.health <= 0) {
this.ws.close();
this.ws = new WebSocket(origin); this.ws = new WebSocket(origin);
this.ws.addEventListener('message', function (e) { that.recv(e) });
this.player = new Player(false, true); this.player = new Player(false, true);
this.entities.push(this.player); this.entities.push(this.player);
} else if (player.isMenu) { } else if (player.isMenu) {