Completely empty Tilemaps can now be created. This allows for dynamic map generation at runtime.

Loads of updates across most the Tilemap files. Not finished yet, still CSV loading to do and a multi-tileset issue to resolve, but it's a lot more flexible now.
This commit is contained in:
photonstorm
2014-03-03 05:19:46 +00:00
parent 6f513042c1
commit d8f5832fa2
12 changed files with 396 additions and 85 deletions
+10
View File
@@ -90,6 +90,11 @@ Phaser.Utils.Debug = function (game) {
*/
this.currentAlpha = 1;
/**
* @property {boolean} dirty - Does the canvas need re-rendering?
*/
this.dirty = false;
};
Phaser.Utils.Debug.prototype = {
@@ -142,6 +147,11 @@ Phaser.Utils.Debug.prototype = {
this.currentAlpha = this.context.globalAlpha;
this.columnWidth = columnWidth;
if (this.sprite && this.dirty)
{
// this.context.clearRect(0, 0, this.canvas.width, this.canvas.height);
}
this.context.save();
this.context.setTransform(1, 0, 0, 1, 0, 0);
this.context.strokeStyle = color;