Skip to content

Commit df71a6d

Browse files
committed
Fix instant ease for non instant actions
1 parent 1a5c6a2 commit df71a6d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

cocos2d-ui/CCBReader/CCAnimationManager.m

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -857,6 +857,13 @@ - (CCActionSequence*)createActionForNode:(CCNode*)node sequenceProperty:(CCBSequ
857857

858858
CCActionInterval* action = [self actionFromKeyframe0:startKF andKeyframe1:endKF propertyName:seqProp.name node:node];
859859

860+
// Create delay to fix instant easing on non instant actions
861+
if(startKF.easingType==kCCBKeyframeEasingInstant &&
862+
![seqProp.name isEqualToString:@"spriteFrame"] &&
863+
![seqProp.name isEqualToString:@"visible"]) {
864+
[actions addObject:[CCActionDelay actionWithDuration:action.duration]];
865+
}
866+
860867
if (action) {
861868
// Apply Easing
862869
action = [self easeAction:action easingType:startKF.easingType easingOpt:startKF.easingOpt];

0 commit comments

Comments
 (0)