Group nearly done. Sprite.anchor appears to be broken though, must fix.

This commit is contained in:
Richard Davey
2013-09-06 20:20:58 +01:00
parent 822a2df289
commit eb7af3d2a2
11 changed files with 544 additions and 199 deletions
+10 -1
View File
@@ -7,9 +7,13 @@ Phaser.Sprite = function (game, x, y, key, frame) {
this.game = game;
// If exists = false then the Sprite isn't updated by the core game loop or physics subsystem at all
this.exists = true;
this.active = true;
// An "invisible" sprite isn't rendered at all
this.visible = true;
// This is a handy little var your game can use to determine if a sprite is alive or not, it doesn't effect rendering
this.alive = true;
this.group = null;
@@ -144,6 +148,11 @@ Phaser.Sprite.prototype.constructor = Phaser.Sprite;
*/
Phaser.Sprite.prototype.update = function() {
if (!this.exists)
{
return;
}
this._cache.dirty = false;
if (this.animations.update())