Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/BialJam/DesuDesu
Browse files Browse the repository at this point in the history
  • Loading branch information
Wjaworowski committed May 22, 2016
2 parents 8a44f6c + 774315c commit 35b8970
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/states/GameState.js
Expand Up @@ -27,8 +27,13 @@ class GameState extends Phaser.State {
createMap() {
this.mapa = new GameMap(this.game, MapConsts.SizeX, MapConsts.SizeY);
this.mapa.scale.set(2,2);
this.mapa.x += 32;
this.mapa.y += 54;

let marginL = (this.game.width - (MapConsts.SizeX * MapConsts.Size * 2)) /2;

this.mapa.x = Math.floor(marginL);

let marginT = ((this.game.height - 50) - (MapConsts.SizeY * MapConsts.Size * 2)) /2;
this.mapa.y = 50 + Math.floor(marginT);
}

addPlayerByInfo(playerInfo) {
Expand Down

0 comments on commit 35b8970

Please sign in to comment.