mirror of
https://github.com/wassname/phaser.git
synced 2026-07-20 12:30:48 +08:00
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:
+2
-2
@@ -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?
|
||||
|
||||
@@ -1227,6 +1227,7 @@ Phaser.Tilemap.prototype = {
|
||||
destroy: function () {
|
||||
|
||||
this.removeAllLayers();
|
||||
this.data = [];
|
||||
this.game = null;
|
||||
|
||||
}
|
||||
|
||||
@@ -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
|
||||
});
|
||||
|
||||
}
|
||||
// }
|
||||
}
|
||||
|
||||
@@ -371,8 +371,6 @@ Phaser.TilemapParser = {
|
||||
|
||||
}
|
||||
|
||||
console.log(map);
|
||||
|
||||
return map;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user