cc.Class({ extends: cc.Component, properties: { }, // ProgressBar.js setValue(value) { if(value<0) return; this.node.getComponent(cc.Sprite).fillRange = value; } });