
cc.Class({
    extends: cc.Component,

    properties: {

        listItemAddress: {
            default: null,
            type: cc.Label,
            serializable: true,
        },
    
        otherUserItem: {
            default: null,
            serializable: false,
        },
    },

    setInfo(context) {
        let { item } = context;
        this.otherUserItem = item;
        this.listItemAddress.string = item.address;
    },

    /**
     * 进入其他用户的农场偷菜
     */
    onEnterOtherFarm() {
        GlobalD.OtherUserInfo = this.otherUserItem;
        if (GlobalD.OtherUserInfo.length <= 0) {
            console.log('没有用户', GlobalD.OtherUserInfo);
        }
        GlobalD.GameData.getOtherUserLandList(GlobalD.OtherUserInfo.userId);
        
    }


});
