From 1bc6ac25fa64471b5339b65919f71a97b73bbbfb Mon Sep 17 00:00:00 2001 From: photonstorm Date: Mon, 7 Oct 2013 22:15:19 +0100 Subject: [PATCH] Preparing to merge new examples. --- README.md | 10 ++++++++-- src/core/Group.js | 12 ++++++++++-- src/gameobjects/Sprite.js | 2 +- 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 229f2f70..b3095d29 100644 --- a/README.md +++ b/README.md @@ -54,8 +54,8 @@ Version 1.0.7 (in progress in the dev branch) * Added Sprite.play as a handy short-cut to play an animation already loaded onto a Sprite. * Fixed small bug stopping Tween.pause / resume from resuming correctly when called directly. * Fixed an issue where Tweens.removeAll wasn't clearing tweens in the addition queue. -* Change: When you swap State all active tweens are now purged. -* BUG: Loader conflict if 2 keys are the same even if they are in different packages (i.e. "title" for picture and audio). +* Change: When you start a new State all active tweens are now purged. +* BUG: Loader conflict if 2 keys are the same even if they are in different packages (i.e. you can't use "title" for both and image and sound file). * Fixed Particle Emitters when using Emitter width/height (thanks XekeDeath) * Made animation looping more robust when skipping frames (thanks XekeDeath) * Fix for incorrect new particle positioning (issue #73) (thanks cottonflop) @@ -89,8 +89,14 @@ Version 1.0.7 (in progress in the dev branch) * Brand new Sprite.update loop handler. Combined with the transform cache fix and further optimisations this is now much quicker to execute. * Made Sprite.body optional and added in checks, so you can safely null the Sprite body object if using your own physics system and not impact rendering. * Fixed typo in StageScaleMode so it's not pageAlignVeritcally any longer, but pageAlignVertically. +* Fixed issue in Group.countLiving / countDead where the value was off by one (thanks mjablonski) +* TODO: look at Sprite.crop (http://www.html5gamedevs.com/topic/1617-error-in-spritecrop/) +* TODO: d-pad example (http://www.html5gamedevs.com/topic/1574-gameinputondown-question/) +* TODO: more touch input examples (http://www.html5gamedevs.com/topic/1556-mobile-touch-event/) * TODO: addMarker hh:mm:ss:ms +* TODO: swap state (non-destructive shift) + Version 1.0.6 (September 24th 2013) diff --git a/src/core/Group.js b/src/core/Group.js index 014f9296..a91a4697 100644 --- a/src/core/Group.js +++ b/src/core/Group.js @@ -807,7 +807,7 @@ Phaser.Group.prototype = { */ countLiving: function () { - var total = -1; + var total = 0; if (this._container.children.length > 0 && this._container.first._iNext) { @@ -824,6 +824,10 @@ Phaser.Group.prototype = { } while (currentNode != this._container.last._iNext); } + else + { + total = -1; + } return total; @@ -837,7 +841,7 @@ Phaser.Group.prototype = { */ countDead: function () { - var total = -1; + var total = 0; if (this._container.children.length > 0 && this._container.first._iNext) { @@ -854,6 +858,10 @@ Phaser.Group.prototype = { } while (currentNode != this._container.last._iNext); } + else + { + total = -1; + } return total; diff --git a/src/gameobjects/Sprite.js b/src/gameobjects/Sprite.js index 485084a5..a19c6225 100644 --- a/src/gameobjects/Sprite.js +++ b/src/gameobjects/Sprite.js @@ -298,7 +298,7 @@ Phaser.Sprite.prototype = Object.create(PIXI.Sprite.prototype); Phaser.Sprite.prototype.constructor = Phaser.Sprite; /** -* Automatically called by World.update. You can create your own update in Objects that extend Phaser.Sprite. +* Automatically called by World.preUpdate. You can create your own update in Objects that extend Phaser.Sprite. * @method Phaser.Sprite.prototype.preUpdate */ Phaser.Sprite.prototype.preUpdate = function() {