cc.Class({ extends: cc.Component, properties: { barPointerPrefab: { default: null, type: cc.Prefab }, barCubePrefab: { default: null, type: cc.Prefab }, barPopPrefab: { default: null, type: cc.Prefab }, bar: { default: null, type: cc.Node } }, // LIFE-CYCLE CALLBACKS: onLoad () { var point1 = cc.instantiate(this.barPointerPrefab); this.bar.addChild(point1); var cube = cc.instantiate(this.barCubePrefab); this.node.addChild(cube); var pop = cc.instantiate(this.barPopPrefab); this.node.addChild(pop); }, start () { }, // update (dt) {}, });