@@ -112,15 +112,7 @@ Phaser.AnimationManager.prototype = {
112112
113113 this . isLoaded = true ;
114114
115- if ( this . _frameData )
116- {
117- return true ;
118- }
119- else
120- {
121- return false ;
122- }
123-
115+ return true ;
124116 } ,
125117
126118 /**
@@ -137,12 +129,6 @@ Phaser.AnimationManager.prototype = {
137129 */
138130 add : function ( name , frames , frameRate , loop , useNumericIndex ) {
139131
140- if ( this . _frameData === null )
141- {
142- console . warn ( 'No FrameData available for Phaser.Animation ' + name ) ;
143- return ;
144- }
145-
146132 frames = frames || [ ] ;
147133 frameRate = frameRate || 60 ;
148134
@@ -441,14 +427,7 @@ Object.defineProperty(Phaser.AnimationManager.prototype, 'frameTotal', {
441427
442428 get : function ( ) {
443429
444- if ( this . _frameData )
445- {
446- return this . _frameData . total ;
447- }
448- else
449- {
450- return - 1 ;
451- }
430+ return this . _frameData . total ;
452431 }
453432
454433} ) ;
@@ -490,7 +469,7 @@ Object.defineProperty(Phaser.AnimationManager.prototype, 'frame', {
490469
491470 set : function ( value ) {
492471
493- if ( typeof value === 'number' && this . _frameData && this . _frameData . getFrame ( value ) !== null )
472+ if ( typeof value === 'number' && this . _frameData . getFrame ( value ) !== null )
494473 {
495474 this . currentFrame = this . _frameData . getFrame ( value ) ;
496475
@@ -529,7 +508,7 @@ Object.defineProperty(Phaser.AnimationManager.prototype, 'frameName', {
529508
530509 set : function ( value ) {
531510
532- if ( typeof value === 'string' && this . _frameData && this . _frameData . getFrameByName ( value ) !== null )
511+ if ( typeof value === 'string' && this . _frameData . getFrameByName ( value ) !== null )
533512 {
534513 this . currentFrame = this . _frameData . getFrameByName ( value ) ;
535514
0 commit comments