cocosbuilder3.0 bug修正:解决在帧上添加音效预览时经常没声音的问题

究其根本,发现是float变量的值比较问题,所以改法如下

文件 SequencerNodeProperty.m

函数keyframesBetweenMinTime

改成

const float EPSINON = 0.0000001;

- (NSArray*) keyframesBetweenMinTime:(float)minTime maxTime:(float)maxTime

{

    NSMutableArray* kfs = [NSMutableArray array];

    for (SequencerKeyframe* keyframe in keyframes)

    {

        float leftF = keyframe.time-minTime;

        float rightF = maxTime-keyframe.time;

        if ((leftF>=0||fabs(leftF)<=EPSINON) &&(rightF>=0|| fabs(rightF) <= EPSINON))

        {

            [kfs addObject:keyframe];

        }

    }

    return kfs;

}


其中的 if ((leftF>=0||fabs(leftF)<=EPSINON) &&(rightF>=0|| fabs(rightF) <= EPSINON)) 就是关键所在,替换原有的大于等于和小于等于


其他bug修正

cocosbuilder3.0 发布zip资源闪退问题

http://blog.csdn.net/loseleo/article/details/9535243

cocosbuilder3在 os x 10.8以下版本下会出现左侧project为空的情况

http://blog.csdn.net/loseleo/article/details/9533847

你可能感兴趣的:(cocosbuilder3.0 bug修正:解决在帧上添加音效预览时经常没声音的问题)