Added Game core loop stepping support. Super-useful for debugging, and helped me track down the issue with jittery physics collision. Double-win!

This commit is contained in:
photonstorm
2014-01-29 17:10:13 +00:00
parent d51a37211c
commit 651858372c
25 changed files with 1268 additions and 438 deletions
+2 -2
View File
@@ -60,9 +60,9 @@ Phaser.Tile = function (layer, index, x, y, width, height) {
this.properties = {};
/**
* @property {boolean} walked - Has this tile been walked / turned into a poly?
* @property {boolean} scanned - Has this tile been walked / turned into a poly?
*/
this.walked = false;
this.scanned = false;
/**
* @property {boolean} faceTop - Is the top of this tile an interesting edge?
+1
View File
@@ -1227,6 +1227,7 @@ Phaser.Tilemap.prototype = {
destroy: function () {
this.removeAllLayers();
this.data = [];
this.game = null;
}
+3
View File
@@ -492,6 +492,8 @@ Phaser.TilemapLayer.prototype.getTiles = function (x, y, width, height, collides
this._results.length = 0;
// var _tile = null;
// this.context.fillStyle = 'rgba(255,0,0,0.3)';
// this.context.fillRect(this._tx * this._cw, this._ty * this._ch, this._tw * this._cw, this._th * this._ch);
for (var wy = this._ty; wy < this._ty + this._th; wy++)
{
@@ -517,6 +519,7 @@ Phaser.TilemapLayer.prototype.getTiles = function (x, y, width, height, collides
tile: this.layer.data[wy][wx],
layer: this.layer.data[wy][wx].layer
});
}
// }
}
-2
View File
@@ -371,8 +371,6 @@ Phaser.TilemapParser = {
}
console.log(map);
return map;
}