Sending player details (name + character selected) on connection

This commit is contained in:
David Négrier 2020-05-15 22:40:06 +02:00
parent fff0e13a2e
commit b80e3e07d8
5 changed files with 48 additions and 45 deletions

View file

@ -40,8 +40,8 @@ export class GameManager {
connect(name: string, characterUserSelected : string) {
this.playerName = name;
this.characterUserSelected = characterUserSelected;
this.ConnexionInstance = new Connexion(name, this);
return this.ConnexionInstance.createConnexion(characterUserSelected).then((data : any) => {
this.ConnexionInstance = new Connexion(this);
return this.ConnexionInstance.createConnexion(name, characterUserSelected).then((data : any) => {
this.SimplePeer = new SimplePeer(this.ConnexionInstance);
return data;
}).catch((err) => {