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); cube.setPosition(cc.v2(-87, -125)); var pop = cc.instantiate(this.barPopPrefab); this.node.addChild(pop); pop.setPosition(cc.v2(-235, 95)); }, start () { }, // update (dt) {}, });