cc.repeat()重复调用25次,求助。

:disappointed_relieved:程序中需要隔一段时间调用一次函数,一共调用25次。就用了 cc.repeat(cc.sequence(cc.delayTime(0.8), cc.callFunc(this.callOver, this)), this.callTime),结果测试 只重复调用24次。如果一共调用26次,就会重复调用26次。


TryCall.zip (46.9 KB)上传中…
上传中…

cc.Class({ extends: cc.Component, properties: { label: { default: null, type: cc.Label }, // defaults, set visually when attaching this script to the Canvas text: 'Hello, World!', callTime: 25 }, // use this for initialization onLoad: function () { this.label.string = this.text; this.callTime = 25; this.node.runAction(cc.repeat(cc.sequence(cc.delayTime(0.8), cc.callFunc(this.callOver, this)), this.callTime)); }, callOver: function () { console.log("--- callOver ---" + this.callTime); this.label.string = this.callTime; this.callTime--; }, // called every frame update: function (dt) { },});

this.node.runAction(cc.repeat(cc.sequence(cc.delayTime(0.8), cc.callFunc(this.callOver, this)), this.callTime));

代码很简单,难道是用错了???

25乘以2的n次方,都会有这个问题

@jare 帮忙艾特……

谢谢反馈,这个问题我们已经修复了,请等下个版本哈!

请问在哪里能看到如何修复的呢

不太记得在哪个仓库了…… 好早以前的了