cc.Class({ extends: cc.Component, properties: { //单价 price: { default: null, type: cc.Label, serializable: true, }, //成熟期 maturity: { default: null, type: cc.Label, serializable: true, }, //种植时间 plantStart: { default: null, type: cc.Label, serializable: true, }, //收获数量 harvestQuantity: { default: null, type: cc.Label, serializable: true, }, //介绍 describe: { default: null, type: cc.Label, serializable: true, }, }, // LIFE-CYCLE CALLBACKS: // onLoad () {}, start () { }, setInfo(price,maturity,plantStart,harvestQuantity,describe){ this.price.string = price; this.maturity.string = maturity; this.plantStart.string = plantStart; this.harvestQuantity.string = harvestQuantity; this.describe.string = describe; }, onclose(){ } });