Skip to content

Commit

Permalink
Code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
arcanous committed Dec 25, 2014
1 parent acf8484 commit a6634b6
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 17 deletions.
16 changes: 1 addition & 15 deletions js/Game.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ PhaserMMORPG.Game.prototype = {
this.blockedLayer = this.map.createLayer('blockedLayer');

//collision on blockedLayer
this.map.setCollisionBetween(1, 2000, true, 'blockedLayer');
this.map.setCollisionBetween(1, 100, true, 'blockedLayer');

//resizes the game world to match the layer dimensions
this.backgroundlayer.resizeWorld();
Expand Down Expand Up @@ -71,16 +71,6 @@ PhaserMMORPG.Game.prototype = {
this.createFromTiledObject(element, this.items);
}, this);
},
createDoors: function() {
//create doors
this.doors = this.game.add.group();
this.doors.enableBody = true;
result = this.findObjectsByType('door', this.map, 'objectsLayer');

result.forEach(function(element){
this.createFromTiledObject(element, this.doors);
}, this);
},

//find objects in a Tiled layer that containt a property called "type" equal to a certain value
findObjectsByType: function(type, map, layer) {
Expand Down Expand Up @@ -111,7 +101,6 @@ PhaserMMORPG.Game.prototype = {
//collision
this.game.physics.arcade.collide(this.player.player, this.blockedLayer);
this.game.physics.arcade.overlap(this.player.player, this.items, this.collect, null, this);
this.game.physics.arcade.overlap(this.player.player, this.doors, this.enterDoor, null, this);

//player movement

Expand Down Expand Up @@ -153,7 +142,4 @@ PhaserMMORPG.Game.prototype = {
//remove sprite
collectable.destroy();
},
enterDoor: function(player, door) {
console.log('entering door that will take you to '+door.targetTilemap+' on x:'+door.targetX+' and y:'+door.targetY);
},
};
2 changes: 0 additions & 2 deletions js/MultiplayerClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@ PhaserMMORPG.eurecaClientSetup = function() {

eurecaClient.exports.setId = function(id)
{
//create() is moved here to make sure nothing is created before uniq id assignation
PhaserMMORPG.MyMyltiplayerId = id;
//create();
PhaserMMORPG.eurecaServer.handshake();
PhaserMMORPG.MultiplayerServerReady = true;
}
Expand Down

0 comments on commit a6634b6

Please sign in to comment.