Completely resetting GameScene on disconnect
This commit is contained in:
parent
43e4489d4d
commit
500dc83a85
2 changed files with 39 additions and 9 deletions
|
@ -117,6 +117,10 @@ export abstract class Character extends Phaser.Physics.Arcade.Sprite {
|
|||
}
|
||||
|
||||
protected playAnimation(direction : string, moving: boolean): void {
|
||||
if (!this.anims) {
|
||||
console.error('ANIMS IS NOT DEFINED!!!');
|
||||
return;
|
||||
}
|
||||
if (moving && (!this.anims.currentAnim || this.anims.currentAnim.key !== direction)) {
|
||||
this.play(this.PlayerTexture+'-'+direction, true);
|
||||
} else if (!moving) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue