Merge branch 'develop' into player-report

# Conflicts:
#	front/src/Connexion/RoomConnection.ts
This commit is contained in:
Gregoire Parant 2020-10-14 15:06:10 +02:00
commit 4799460064
11 changed files with 56 additions and 20 deletions

View file

@ -385,9 +385,6 @@ export class GameScene extends ResizableScene implements CenterListener {
//create input to move
this.userInputManager = new UserInputManager(this);
//TODO check right of user
this.ConsoleGlobalMessageManager = new ConsoleGlobalMessageManager(this.connection, this.userInputManager);
//notify game manager can to create currentUser in map
this.createCurrentPlayer();
@ -518,6 +515,10 @@ export class GameScene extends ResizableScene implements CenterListener {
connection.onStartRoom((roomJoinedMessage: RoomJoinedMessageInterface) => {
this.initUsersPosition(roomJoinedMessage.users);
this.connectionAnswerPromiseResolve(roomJoinedMessage);
// Analyze tags to find if we are admin. If yes, show console.
if (this.connection.hasTag('admin')) {
this.ConsoleGlobalMessageManager = new ConsoleGlobalMessageManager(this.connection, this.userInputManager);
}
});
connection.onUserJoins((message: MessageUserJoined) => {