Permit to dissociate data by room
- Update share room id. - Join room when a scene is loaded. - Add a room in constant variable.
This commit is contained in:
@@ -71,6 +71,10 @@ export class GameManager {
|
||||
this.status = StatusGameManagerEnum.CURRENT_USER_CREATED;
|
||||
}
|
||||
|
||||
joinRoom(sceneKey : string, character: string){
|
||||
this.ConnexionInstance.joinARoom(sceneKey, character);
|
||||
}
|
||||
|
||||
/**
|
||||
* Share position in game
|
||||
* @param ListMessageUserPosition
|
||||
@@ -120,7 +124,7 @@ export class GameManager {
|
||||
}
|
||||
|
||||
pushPlayerPosition(event: HasMovedEvent) {
|
||||
this.ConnexionInstance.sharePosition(event.x, event.y, event.character, event.direction);
|
||||
this.ConnexionInstance.sharePosition(event.x, event.y, event.character, this.currentGameScene.scene.key, event.direction);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user