TileSprite now has the alive property, which should help with some Group operations (thanks @jonkelling #1085)

This commit is contained in:
photonstorm 2014-08-28 02:36:30 +01:00
parent 42c810b43f
commit 6b4510f693
2 changed files with 8 additions and 0 deletions

View file

@ -82,6 +82,7 @@ Version 2.1.0 - "Cairhien" - -in development-
* Added a new Phaser.Rope object. This allows for a series of 'chained' Sprites and extends the Rope support built into Pixi. Access it via game.add.rope (thanks @codevinsky #1030)
* Phaser.Device.isAndroidStockBrowser will inform you if your game is running in a stock Android browser (rather than Chrome) where you may wish to scale down effects, disable WebGL, etc (thanks @lucbloom #989)
* Phaser.Camera has a new property `position` which is a Point object that allows you to get or set the camera position without having to read both the x and y values (thanks @Zielak #1015)
* TileSprite now has the `alive` property, which should help with some Group operations (thanks @jonkelling #1085)
### Updates

View file

@ -133,6 +133,12 @@ Phaser.TileSprite = function (game, x, y, width, height, key, frame) {
*/
this.body = null;
/**
* @property {boolean} alive - A useful boolean to control if the TileSprite is alive or dead (in terms of your gameplay, it doesn't effect rendering).
* @default
*/
this.alive = true;
/**
* A small internal cache:
* 0 = previous position.x
@ -476,6 +482,7 @@ Phaser.TileSprite.prototype.destroy = function(destroyChildren) {
this.exists = false;
this.visible = false;
this.alive = false;
this.filters = null;
this.mask = null;