我又来了,这次请教关于进度条ProgressBar

cc.Class({
extends: cc.Component,

properties: {
    jdtNode: cc.Node,
},

// LIFE-CYCLE CALLBACKS:

// onLoad () {
      this.jdtNode.Progress = 0.2
},

start () {

},

update (dt) {
   

},

});
进度不是直接给Progress赋值吗?

this.jdtNode.getComponent(cc.ProgressBar).progress = 0.2
加群 论坛问问题太费劲

你获取的是节点 ,不是组件
properties: {
jdtNode: cc.ProgressBar,
},

// LIFE-CYCLE CALLBACKS:

// onLoad () {
this.jdtNode.progress = 0.2
},

start () {

},

update (dt) {

},
这样就行了

或者
properties: {
jdtNode: cc.Node,
},

// LIFE-CYCLE CALLBACKS:

// onLoad () {
this.jdtNode.getComponent(cc.ProgressBar).progress = 0.2
},

start () {

},

update (dt) {

},

群号 727901932

谢谢两位大佬的解答。。。问题可能太简单了,论坛都搜不到。

确实很简单…这可以说是最基本的了。。就相当于是你想给车换个后视镜,,却把轮胎卸下来- -把后视镜装在轮胎上