Merge branch 'master' into webrtc
# Conflicts: # front/src/Phaser/Game/GameManager.ts
This commit is contained in:
commit
8c935e8b27
12 changed files with 682 additions and 115 deletions
|
@ -24,19 +24,12 @@ export class GameManager implements GameManagerInterface {
|
|||
|
||||
constructor() {
|
||||
this.status = StatusGameManagerEnum.IN_PROGRESS;
|
||||
ConnexionInstance = new Connexion("test@gmail.com", this);
|
||||
this.configureGame();
|
||||
}
|
||||
|
||||
createGame(){
|
||||
return ConnexionInstance.createConnexion().then(() => {
|
||||
this.configureGame();
|
||||
/** TODO add loader in the page **/
|
||||
//initialise Pear Connexion of game
|
||||
this.SimplePeer = new SimplePeer(ConnexionInstance);
|
||||
}).catch((err) => {
|
||||
console.error(err);
|
||||
throw err;
|
||||
});
|
||||
connect(email:string) {
|
||||
ConnexionInstance = new Connexion(email, this);
|
||||
this.SimplePeer = new SimplePeer(ConnexionInstance);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -79,4 +72,6 @@ export class GameManager implements GameManagerInterface {
|
|||
console.error(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export const gameManager = new GameManager();
|
Loading…
Add table
Add a link
Reference in a new issue