Add button to enter un visio

This commit is contained in:
gparant 2020-04-26 20:55:20 +02:00
parent 707931724f
commit b49c012319
7 changed files with 91 additions and 12 deletions

View file

@ -15,7 +15,6 @@ export interface GameManagerInterface {
status : number;
SimplePeer: SimplePeerInterface;
createCurrentPlayer() : void;
startWebRtc() : void;
shareUserPosition(ListMessageUserPosition : ListMessageUserPositionInterface): void;
}
export class GameManager implements GameManagerInterface {
@ -62,10 +61,6 @@ export class GameManager implements GameManagerInterface {
this.status = StatusGameManagerEnum.CURRENT_USER_CREATED;
}
startWebRtc() : void {
this.SimplePeer.startWebRtc();
}
/**
* Share position in game
* @param ListMessageUserPosition

View file

@ -253,7 +253,7 @@ export class GameScene extends Phaser.Scene implements GameSceneInterface{
//init colision
this.physics.add.collider(this.CurrentPlayer, player, (CurrentPlayer: CurrentGamerInterface, MapPlayer: GamerInterface) => {
CurrentPlayer.say("Hello, how are you ? ");
this.GameManager.startWebRtc();
this.GameManager.SimplePeer.activePhone();
});
}
}