File tree Expand file tree Collapse file tree 2 files changed +7
-12
lines changed Expand file tree Collapse file tree 2 files changed +7
-12
lines changed Original file line number Diff line number Diff line change @@ -1941,7 +1941,7 @@ cc.Animate = cc.ActionInterval.extend(/** @lends cc.Animate# */{
19411941 } ,
19421942
19431943 /**
1944- * @param {cc.Node } target
1944+ * @param {cc.Sprite } target
19451945 */
19461946 startWithTarget :function ( target ) {
19471947 //this._super(target);
@@ -1975,20 +1975,15 @@ cc.Animate = cc.ActionInterval.extend(/** @lends cc.Animate# */{
19751975
19761976 var frames = this . _animation . getFrames ( ) ;
19771977 var numberOfFrames = frames . length ;
1978- var frameToDisplay = null ;
19791978
19801979 for ( var i = this . _nextFrame ; i < numberOfFrames ; i ++ ) {
1981- var splitTime = this . _splitTimes [ i ] ;
1980+ if ( this . _splitTimes [ i ] <= time ) {
1981+ this . _target . setDisplayFrame ( frames [ i ] . getSpriteFrame ( ) ) ;
19821982
1983- if ( splitTime <= time ) {
1984- var frame = frames [ i ] ;
1985- frameToDisplay = frame . getSpriteFrame ( ) ;
1986- this . _target . setDisplayFrame ( frameToDisplay ) ;
1987-
1988- var dict = frame . getUserInfo ( ) ;
1989- if ( dict ) {
1983+ //var dict = frame.getUserInfo();
1984+ //if (dict) {
19901985 //TODO: [[NSNotificationCenter defaultCenter] postNotificationName:CCAnimationFrameDisplayedNotification object:target_ userInfo:dict];
1991- }
1986+ // }
19921987 this . _nextFrame = i + 1 ;
19931988 break ;
19941989 }
Original file line number Diff line number Diff line change @@ -171,7 +171,7 @@ cc.Rect.CCRectGetMaxX = function (rect) {
171171 * Constructor
172172 */
173173cc . Rect . CCRectGetMidX = function ( rect ) {
174- return ( ( rect . origin . x + rect . size . width ) / 2.0 ) ;
174+ return ( rect . origin . x + rect . size . width / 2.0 ) ;
175175} ;
176176/**
177177 * return the leftmost x-value of 'rect'
You can’t perform that action at this time.
0 commit comments