
cc.Class({
    extends: cc.Component,

    properties: {
        //种子作物的名字
        plantName: {
            default: null,
            type: cc.Label
        },
        //单价
        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(name, price, maturity, plantStart, harvestQuantity, describe) {
        this.plantName.string = name;
        this.price.string = price;
        this.maturity.string = maturity;
        this.plantStart.string = plantStart;
        this.harvestQuantity.string = harvestQuantity;
        this.describe.string = describe;
    },

    onclose() {
        this.node.destroy();
    }
});
