State handling done. Refactored the Game constructor a LOT. Now works from within closures, outside of them, with Phaser.State objects or normal Objects with the right functions inside. Also fixed some small bugs in PluginManager and various scope issues with RAF.

This commit is contained in:
Richard Davey committed 2013-08-29 07:06:16 +01:00
1 parent 3c8cd20b70
commit 4bbcc380c5
12 files changed
+558 -475

No files matched your search

+6 -6
View File
@@ -98,21 +98,21 @@ Phaser.TweenManager.prototype = {
*/
update: function () {
if ( _tweens.length === 0 ) return false;
if ( this._tweens.length === 0 ) return false;
var i = 0, numTweens = _tweens.length;
var i = 0, numTweens = this._tweens.length;
while ( i < numTweens ) {
if ( _tweens[ i ].update( this.game.time.now ) ) {
if ( this._tweens[ i ].update( this.game.time.now ) ) {
i ++;
i++;
} else {
_tweens.splice( i, 1 );
this._tweens.splice( i, 1 );
numTweens --;
numTweens--;
}