Update video style and start peer connexion

This commit is contained in:
gparant 2020-05-01 21:15:00 +02:00
parent dbf0bef149
commit e06b20fe96
7 changed files with 140 additions and 131 deletions

View file

@ -25,6 +25,7 @@ export class Player extends PlayableCaracter implements CurrentGamerInterface, G
userId: string;
PlayerValue: string;
userInputManager: UserInputManager;
previousMove: string;
constructor(
userId: string,
@ -90,7 +91,10 @@ export class Player extends PlayableCaracter implements CurrentGamerInterface, G
direction = PlayerAnimationNames.None;
this.stop();
}
this.sharePosition(direction);
if(this.previousMove !== PlayerAnimationNames.None || direction !== PlayerAnimationNames.None){
this.sharePosition(direction);
}
this.previousMove = direction;
}
private sharePosition(direction: string) {