cc.Class({ extends: cc.Component, properties: { part1: { default: null, type: cc.Node }, part2: { default: null, type: cc.Node }, processBarPrefab: { default: null, type: cc.Prefab }, puzzlePrefab: { default: null, type: cc.Prefab } }, // LIFE-CYCLE CALLBACKS: onLoad () { var processBar = cc.instantiate(this.processBarPrefab); this.part1.addChild(processBar); var puzzle = cc.instantiate(this.puzzlePrefab); this.part2.addChild(puzzle); }, start () { }, // update (dt) {}, });