mirror of
https://github.com/wassname/phaser.git
synced 2026-10-02 12:30:54 +08:00
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:
1 parent
3c8cd20b70
commit
4bbcc380c5
12 files changed
+558
-475
No files matched your search
@@ -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--;
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user