cc.tween.repeat的bug(重复次数有问题)2.3.2

  • Creator 版本:2.3.2 或 2.3.4

  • 目标平台:

  • 详细报错信息,包含调用堆栈:

  • 重现方式:

  • 之前哪个版本是正常的 :

  • 手机型号 :

  • 手机浏览器 :

  • 编辑器操作系统 :

  • 编辑器之前是否有其它报错 :

  • 出现概率:

  • 额外线索:

      var test = cc.tween(this).repeat(3, cc.tween(this).call(() => {
          console.log(1)
      }))
      var test1 = cc.tween(this).call(() => {
          console.log(2)
      })
      cc.tween(this).sequence(test, test1).start();
      输出 1  1  2
      改成下面这样会输出 1  1  1  2
      var test = cc.tween(this).repeat(3, cc.tween(this).call(() => {
          console.log(1)
      }).delay(1))//加了延迟1秒
      var test1 = cc.tween(this).call(() => {
          console.log(2)
      })
      cc.tween(this).sequence(test, test1).start();
    

NewProject1.rar (651.9 KB)

引擎组在哪?都没人?

今天也遇到了这个问题,但是如果call和to一起重复的话,就算to的时间是0,也不会少重复一下,我用的是2.4.2…

应该是repeat里直接call就有这个问题

感觉这不是tween的bug,是Action的bug。
你试试:

//执行一次
cc.Canvas.instance.node.runAction(
    cc.repeat(cc.callFunc(() => console.log(1)), 2)
)
//不执行
cc.Canvas.instance.node.runAction(
    cc.repeat(cc.callFunc(() => console.log(1)), 1)
)
//执行两次
cc.Canvas.instance.node.runAction(
    cc.repeat(cc.sequence(
        cc.delayTime(0),
        cc.callFunc(() => console.log(1))
    ), 2)
)

我是cocos 2.4.2

cc.place也一样,估计所有的cc.ActionInstant都是这样吧。

tween就是对action的封装吧,所以其实是一个东西

1.9.3同样的问题