@@ -211,12 +211,12 @@ - (CCActionInterval*)actionFromKeyframe0:(CCBKeyframe*)kf0 andKeyframe1:(CCBKeyf
211
211
return [CCActionTintTo actionWithDuration: duration color: color];
212
212
} else if ([name isEqualToString: @" visible" ]) {
213
213
if ([kf1.value boolValue ]) {
214
- return [CCActionSequence actionOne: [CCActionDelay actionWithDuration: duration] two: [ CCActionShow action ] ];
214
+ return [CCActionShow action ];
215
215
} else {
216
- return [CCActionSequence actionOne: [CCActionDelay actionWithDuration: duration] two: [ CCActionHide action ] ];
216
+ return [CCActionHide action ];
217
217
}
218
218
} else if ([name isEqualToString: @" spriteFrame" ]) {
219
- return [CCActionSequence actionOne: [CCActionDelay actionWithDuration: duration] two: [ CCActionSpriteFrame actionWithSpriteFrame: kf1.value] ];
219
+ return [CCActionSpriteFrame actionWithSpriteFrame: kf1.value];
220
220
} else {
221
221
CCLOG (@" CCBReader: Failed to create animation for property: %@ " , name);
222
222
}
@@ -360,7 +360,7 @@ - (void)runActionsForNode:(CCNode*)node sequenceProperty:(CCBSequenceProperty*)s
360
360
if (numKeyframes<1 ) return ;
361
361
362
362
// Action Sequence Builder
363
- NSMutableArray * actions = [NSMutableArray array ];
363
+ NSMutableArray * actions = [NSMutableArray array ];
364
364
int endFrame = startFrame+1 ;
365
365
366
366
if (endFrame==numKeyframes || endFrame<0 )
@@ -862,10 +862,8 @@ - (CCActionSequence*)createActionForNode:(CCNode*)node sequenceProperty:(CCBSequ
862
862
if (action) {
863
863
864
864
// 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]];
869
867
}
870
868
871
869
// Apply Easing
0 commit comments