bugfix again
This commit is contained in:
parent
994e5aa958
commit
f5d72c01e5
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