Skip to content

Commit 8a85155

Browse files
committed
Fixed the tilemap pre/post update hooks.
1 parent ecf61fc commit 8a85155

3 files changed

Lines changed: 30 additions & 0 deletions

File tree

Phaser/tilemap/Tilemap.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -487,6 +487,24 @@ module Phaser {
487487

488488
}
489489

490+
/**
491+
* Can be over-ridden if required
492+
*/
493+
public preUpdate() {
494+
}
495+
496+
/**
497+
* Can be over-ridden if required
498+
*/
499+
public update() {
500+
}
501+
502+
/**
503+
* Can be over-ridden if required
504+
*/
505+
public postUpdate() {
506+
}
507+
490508
public destroy() {
491509

492510
this.texture = null;

Tests/phaser-debug.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8170,6 +8170,12 @@ var Phaser;
81708170
if (typeof layer === "undefined") { layer = this.currentLayer.ID; }
81718171
this.layers[layer].putTile(x, y, index);
81728172
};
8173+
Tilemap.prototype.preUpdate = function () {
8174+
};
8175+
Tilemap.prototype.update = function () {
8176+
};
8177+
Tilemap.prototype.postUpdate = function () {
8178+
};
81738179
Tilemap.prototype.destroy = function () {
81748180
this.texture = null;
81758181
this.transform = null;

build/phaser-debug.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8170,6 +8170,12 @@ var Phaser;
81708170
if (typeof layer === "undefined") { layer = this.currentLayer.ID; }
81718171
this.layers[layer].putTile(x, y, index);
81728172
};
8173+
Tilemap.prototype.preUpdate = function () {
8174+
};
8175+
Tilemap.prototype.update = function () {
8176+
};
8177+
Tilemap.prototype.postUpdate = function () {
8178+
};
81738179
Tilemap.prototype.destroy = function () {
81748180
this.texture = null;
81758181
this.transform = null;

0 commit comments

Comments
 (0)