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();
|
|
@ -58,7 +58,6 @@ export class GameScene extends Phaser.Scene implements GameSceneInterface{
|
|||
})
|
||||
});
|
||||
this.load.tilemapTiledJSON(Textures.Map, mapUrl);
|
||||
this.load.image(Textures.Rock, 'resources/objects/rockSprite.png');
|
||||
this.load.spritesheet(Textures.Player,
|
||||
'resources/characters/pipoya/Male 01-1.png',
|
||||
{ frameWidth: 32, frameHeight: 32 }
|
||||
|
@ -99,7 +98,6 @@ export class GameScene extends Phaser.Scene implements GameSceneInterface{
|
|||
|
||||
//add entities
|
||||
this.Objects = new Array<Phaser.Physics.Arcade.Sprite>();
|
||||
this.addSpite(this.physics.add.sprite(200, 400, Textures.Rock, 26));
|
||||
|
||||
//init event click
|
||||
this.EventToClickOnTile();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue