When sharing user position, only position is sent now!
This commit is contained in:
parent
cdfa9acf01
commit
4d1c3517ec
5 changed files with 40 additions and 55 deletions
|
@ -81,12 +81,12 @@ export class Player extends PlayableCaracter implements CurrentGamerInterface, G
|
|||
}
|
||||
if (x !== 0 || y !== 0) {
|
||||
this.move(x, y);
|
||||
this.emit(hasMovedEventName, {direction, x: this.x, y: this.y, character: this.PlayerTexture});
|
||||
this.emit(hasMovedEventName, {direction, x: this.x, y: this.y});
|
||||
} else {
|
||||
if (this.previousMove !== PlayerAnimationNames.None) {
|
||||
direction = PlayerAnimationNames.None;
|
||||
this.stop();
|
||||
this.emit(hasMovedEventName, {direction, x: this.x, y: this.y, character: this.PlayerTexture});
|
||||
this.emit(hasMovedEventName, {direction, x: this.x, y: this.y});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue