Ejemplo n.º 1
0
    public void SetShortCutCostDetail(int userFacilityID)
    {
        UserFacility userFacility = Singleton <UserDataMng> .Instance.GetUserFacility(userFacilityID);

        string text = string.Empty;
        string num  = string.Empty;

        if (userFacility.level == 0)
        {
            FacilityM facilityMaster = FarmDataManager.GetFacilityMaster(userFacility.facilityId);
            text = facilityMaster.shorteningAssetCategoryId1;
            num  = facilityMaster.shorteningAssetNum1;
        }
        else
        {
            FacilityUpgradeM facilityUpgradeMaster = FarmDataManager.GetFacilityUpgradeMaster(userFacility.facilityId, userFacility.level);
            text = facilityUpgradeMaster.shorteningAssetCategoryId1;
            num  = facilityUpgradeMaster.shorteningAssetNum1;
        }
        this.SetCostIcon(text);
        this.costValue = FarmUtility.GetShortCutDigiStoneCost(text, num, userFacility.completeTime);
        this.SetCostLabel(text, this.costValue);
    }