bugfix again
This commit is contained in:
parent
03bb36be88
commit
635c5d577c
1 changed files with 1 additions and 0 deletions
|
@ -122,6 +122,7 @@ class Game extends GameBasic {
|
||||||
let { player } = this;
|
let { player } = this;
|
||||||
|
|
||||||
if (player.health <= 0) {
|
if (player.health <= 0) {
|
||||||
|
let that = this;
|
||||||
this.ws.close();
|
this.ws.close();
|
||||||
this.ws = new WebSocket(origin);
|
this.ws = new WebSocket(origin);
|
||||||
this.ws.addEventListener('message', function (e) { that.recv(e) });
|
this.ws.addEventListener('message', function (e) { that.recv(e) });
|
||||||
|
|
Loading…
Reference in a new issue