Fix User depth

- Update strategy layers depth
 - Add depth to manager layers positions between all users
This commit is contained in:
gparant 2020-05-08 17:35:40 +02:00
parent c59d693f6e
commit 59127534ac
4 changed files with 37 additions and 33 deletions

View file

@ -41,7 +41,6 @@ export class Player extends PlayableCaracter implements CurrentGamerInterface, G
//set data
this.userId = userId;
//the current player model should be push away by other players to prevent conflict
this.setImmovable(false);
}
@ -102,6 +101,7 @@ export class Player extends PlayableCaracter implements CurrentGamerInterface, G
playAnimation(this, MessageUserPosition.position.direction);
this.setX(MessageUserPosition.position.x);
this.setY(MessageUserPosition.position.y);
this.setDepth(MessageUserPosition.position.y);
this.updatePlayerNamePosition(MessageUserPosition.position.x, MessageUserPosition.position.y);
}
}