@@ -211,12 +211,12 @@ - (CCActionInterval*)actionFromKeyframe0:(CCBKeyframe*)kf0 andKeyframe1:(CCBKeyf
211211 return [CCActionTintTo actionWithDuration: duration color: color];
212212 } else if ([name isEqualToString: @" visible" ]) {
213213 if ([kf1.value boolValue ]) {
214- return [CCActionSequence actionOne: [CCActionDelay actionWithDuration: duration] two: [ CCActionShow action ] ];
214+ return [CCActionShow action ];
215215 } else {
216- return [CCActionSequence actionOne: [CCActionDelay actionWithDuration: duration] two: [ CCActionHide action ] ];
216+ return [CCActionHide action ];
217217 }
218218 } else if ([name isEqualToString: @" spriteFrame" ]) {
219- return [CCActionSequence actionOne: [CCActionDelay actionWithDuration: duration] two: [ CCActionSpriteFrame actionWithSpriteFrame: kf1.value] ];
219+ return [CCActionSpriteFrame actionWithSpriteFrame: kf1.value];
220220 } else {
221221 CCLOG (@" CCBReader: Failed to create animation for property: %@ " , name);
222222 }
@@ -360,7 +360,7 @@ - (void)runActionsForNode:(CCNode*)node sequenceProperty:(CCBSequenceProperty*)s
360360 if (numKeyframes<1 ) return ;
361361
362362 // Action Sequence Builder
363- NSMutableArray * actions = [NSMutableArray array ];
363+ NSMutableArray * actions = [NSMutableArray array ];
364364 int endFrame = startFrame+1 ;
365365
366366 if (endFrame==numKeyframes || endFrame<0 )
@@ -862,10 +862,8 @@ - (CCActionSequence*)createActionForNode:(CCNode*)node sequenceProperty:(CCBSequ
862862 if (action) {
863863
864864 // Instant
865- if (startKF.easingType ==kCCBKeyframeEasingInstant &&
866- ![seqProp.name isEqualToString: @" spriteFrame" ] &&
867- ![seqProp.name isEqualToString: @" visible" ]) {
868- [actions addObject: [CCActionDelay actionWithDuration: action.duration]];
865+ if (startKF.easingType ==kCCBKeyframeEasingInstant ) {
866+ [actions addObject: [CCActionDelay actionWithDuration: endKF.time-startKF.time]];
869867 }
870868
871869 // Apply Easing
0 commit comments