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 * @param y
*/ */
sharePosition(roomId : string, x : number, y : number){ sharePosition(roomId : string, x : number, y : number){
if(!this.socket){
return;
}
let messageUserPosition = new MessageUserPosition(this.email, roomId, new Point(x, y)); let messageUserPosition = new MessageUserPosition(this.email, roomId, new Point(x, y));
this.socket.emit('user-position', messageUserPosition.toString()); this.socket.emit('user-position', messageUserPosition.toString());
} }

View File

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

View File

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