Skip to content

Commit 6b4510f

Browse files
committed
TileSprite now has the alive property, which should help with some Group operations (thanks @jonkelling phaserjs#1085)
1 parent 42c810b commit 6b4510f

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ Version 2.1.0 - "Cairhien" - -in development-
8282
* 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)
8383
* 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)
8484
* 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)
85+
* TileSprite now has the `alive` property, which should help with some Group operations (thanks @jonkelling #1085)
8586

8687
### Updates
8788

src/gameobjects/TileSprite.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,12 @@ Phaser.TileSprite = function (game, x, y, width, height, key, frame) {
133133
*/
134134
this.body = null;
135135

136+
/**
137+
* @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).
138+
* @default
139+
*/
140+
this.alive = true;
141+
136142
/**
137143
* A small internal cache:
138144
* 0 = previous position.x
@@ -476,6 +482,7 @@ Phaser.TileSprite.prototype.destroy = function(destroyChildren) {
476482

477483
this.exists = false;
478484
this.visible = false;
485+
this.alive = false;
479486

480487
this.filters = null;
481488
this.mask = null;

0 commit comments

Comments
 (0)