File tree Expand file tree Collapse file tree
src/gameobjects/components Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -817,25 +817,27 @@ var Animation = new Class({
817817 */
818818 update : function ( timestamp , delta )
819819 {
820- if ( this . currentAnim && ( this . isPlaying || ! this . currentAnim . paused ) )
820+ if ( ! this . currentAnim || ! this . isPlaying || this . currentAnim . paused )
821821 {
822- this . accumulator += delta * this . _timeScale ;
822+ return ;
823+ }
823824
824- if ( this . _pendingStop === 1 )
825- {
826- this . _pendingStopValue -= delta ;
825+ this . accumulator += delta * this . _timeScale ;
827826
828- if ( this . _pendingStopValue <= 0 )
829- {
830- return this . currentAnim . completeAnimation ( this ) ;
831- }
832- }
827+ if ( this . _pendingStop === 1 )
828+ {
829+ this . _pendingStopValue -= delta ;
833830
834- if ( this . accumulator >= this . nextTick )
831+ if ( this . _pendingStopValue <= 0 )
835832 {
836- this . currentAnim . setFrame ( this ) ;
833+ return this . currentAnim . completeAnimation ( this ) ;
837834 }
838835 }
836+
837+ if ( this . accumulator >= this . nextTick )
838+ {
839+ this . currentAnim . setFrame ( this ) ;
840+ }
839841 } ,
840842
841843 /**
You can’t perform that action at this time.
0 commit comments