From aba332218881a86eac79250a6669e912d3e0db3f Mon Sep 17 00:00:00 2001 From: gparant Date: Tue, 7 Apr 2020 20:46:30 +0200 Subject: [PATCH] Fix CI --- front/src/Connexion.ts | 3 +++ front/src/Phaser/Game/GameScene.ts | 2 +- front/src/Phaser/Player/Animation.ts | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/front/src/Connexion.ts b/front/src/Connexion.ts index b27be36..18bcd6d 100644 --- a/front/src/Connexion.ts +++ b/front/src/Connexion.ts @@ -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()); } diff --git a/front/src/Phaser/Game/GameScene.ts b/front/src/Phaser/Game/GameScene.ts index 947da7b..d3abfd1 100644 --- a/front/src/Phaser/Game/GameScene.ts +++ b/front/src/Phaser/Game/GameScene.ts @@ -27,7 +27,7 @@ export class GameScene extends Phaser.Scene implements GameSceneInterface{ } //hook initialisation - init(){}; + init(){} //hook create scene create(): void { diff --git a/front/src/Phaser/Player/Animation.ts b/front/src/Phaser/Player/Animation.ts index 3652a8d..38f2afd 100644 --- a/front/src/Phaser/Player/Animation.ts +++ b/front/src/Phaser/Player/Animation.ts @@ -13,7 +13,7 @@ export enum PlayerAnimationNames { WalkUp = 'up', WalkRight = 'right', None = 'none', -}; +} export const getPlayerAnimations = (PlayerValue : string): AnimationData[] => { return [{ -- 2.25.1