美文网首页
cocos creator 2.4.5 使用时的一些易错点

cocos creator 2.4.5 使用时的一些易错点

作者: 吴此人 | 来源:发表于2022-07-10 22:28 被阅读0次

    1、cc.tween(this.node).bezierTo(time,p1,p2,endp).start()。会把node弄到别的坐标,,我三个点的y轴都为负,结束时发现为正了!!应该使用 this.node.runAction(cc.bezierTo(time,[startP,centerP,endP]));这样就是正确的。 但是不管cc.bezierTo还是runAction都没有完成动画时的事件回调,目前只能采用 this.schedule(function() {

         // 这里的 this 指向 component

         this.doSomething();

     }, time, repeat, delay)的方式在动画结束后执行回调

    相关文章

      网友评论

          本文标题:cocos creator 2.4.5 使用时的一些易错点

          本文链接:https://www.haomeiwen.com/subject/qljgbrtx.html