From 8a85155c08eed03792be9a1ac434874852f50620 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Sun, 25 Aug 2013 10:35:58 +0100 Subject: [PATCH] Fixed the tilemap pre/post update hooks. --- Phaser/tilemap/Tilemap.ts | 18 ++++++++++++++++++ Tests/phaser-debug.js | 6 ++++++ build/phaser-debug.js | 6 ++++++ 3 files changed, 30 insertions(+) diff --git a/Phaser/tilemap/Tilemap.ts b/Phaser/tilemap/Tilemap.ts index de1b39b2..171e1cfa 100644 --- a/Phaser/tilemap/Tilemap.ts +++ b/Phaser/tilemap/Tilemap.ts @@ -487,6 +487,24 @@ module Phaser { } + /** + * Can be over-ridden if required + */ + public preUpdate() { + } + + /** + * Can be over-ridden if required + */ + public update() { + } + + /** + * Can be over-ridden if required + */ + public postUpdate() { + } + public destroy() { this.texture = null; diff --git a/Tests/phaser-debug.js b/Tests/phaser-debug.js index b778b42c..b4d3a73f 100644 --- a/Tests/phaser-debug.js +++ b/Tests/phaser-debug.js @@ -8170,6 +8170,12 @@ var Phaser; if (typeof layer === "undefined") { layer = this.currentLayer.ID; } this.layers[layer].putTile(x, y, index); }; + Tilemap.prototype.preUpdate = function () { + }; + Tilemap.prototype.update = function () { + }; + Tilemap.prototype.postUpdate = function () { + }; Tilemap.prototype.destroy = function () { this.texture = null; this.transform = null; diff --git a/build/phaser-debug.js b/build/phaser-debug.js index b778b42c..b4d3a73f 100644 --- a/build/phaser-debug.js +++ b/build/phaser-debug.js @@ -8170,6 +8170,12 @@ var Phaser; if (typeof layer === "undefined") { layer = this.currentLayer.ID; } this.layers[layer].putTile(x, y, index); }; + Tilemap.prototype.preUpdate = function () { + }; + Tilemap.prototype.update = function () { + }; + Tilemap.prototype.postUpdate = function () { + }; Tilemap.prototype.destroy = function () { this.texture = null; this.transform = null;