This commit is contained in:
gparant 2020-04-07 20:46:30 +02:00
parent bac1e804ad
commit aba3322188
3 changed files with 5 additions and 2 deletions

View File

@ -119,6 +119,9 @@ export class Connexion {
* @param y
*/
sharePosition(roomId : string, x : number, y : number){
if(!this.socket){
return;
}
let messageUserPosition = new MessageUserPosition(this.email, roomId, new Point(x, y));
this.socket.emit('user-position', messageUserPosition.toString());
}

View File

@ -27,7 +27,7 @@ export class GameScene extends Phaser.Scene implements GameSceneInterface{
}
//hook initialisation
init(){};
init(){}
//hook create scene
create(): void {

View File

@ -13,7 +13,7 @@ export enum PlayerAnimationNames {
WalkUp = 'up',
WalkRight = 'right',
None = 'none',
};
}
export const getPlayerAnimations = (PlayerValue : string): AnimationData[] => {
return [{