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:
parent
27c6034661
commit
5f11b065e1
7 changed files with 46 additions and 27 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue