コード例 #1
0
    private void RefreshReward(RewardPreviewUI.CopyType type)
    {
        SpecialFightMode mode = SpecialFightMode.None;

        switch (type)
        {
        case RewardPreviewUI.CopyType.GUARD:
            mode = SpecialFightMode.Hold;
            break;

        case RewardPreviewUI.CopyType.ESCORT:
            mode = SpecialFightMode.Protect;
            break;

        case RewardPreviewUI.CopyType.ATTACK:
            mode = SpecialFightMode.Save;
            break;
        }
        SpecialFightCommonTableData specialFightCommonTableData = SpecialFightManager.GetSpecialFightCommonTableData(mode);

        if (specialFightCommonTableData != null)
        {
            for (int i = 0; i < this.mSpecialRewards.get_childCount(); i++)
            {
                Object.Destroy(this.mSpecialRewards.GetChild(i).get_gameObject());
            }
            for (int j = 0; j < specialFightCommonTableData.itemIDs.get_Count(); j++)
            {
                GameObject gameObject = ItemShow.ShowItem(this.mSpecialRewards, specialFightCommonTableData.itemIDs.get_Item(j), 0L, false, null, 2001);
                gameObject.get_transform().set_localScale(new Vector3(0.5f, 0.5f, 1f));
            }
            this.mSpecialRewards.get_gameObject().SetActive(true);
        }
    }
コード例 #2
0
    private void InitTable()
    {
        this.commonData           = new SpecialFightCommonTableData();
        this.commonData.dungeonID = DataReader <FJingYanFuBenPeiZhi> .Get("dungeonId").num;

        this.commonData.priceList.AddRange(DataReader <FJingYanFuBenPeiZhi> .Get("price").date);
        this.commonData.itemIDs.AddRange(DataReader <FJingYanFuBenPeiZhi> .Get("ItemIds").date);
        this.commonData.itemNums.AddRange(DataReader <FJingYanFuBenPeiZhi> .Get("ItemNum").date);
        this.commonData.picture = DataReader <FJingYanFuBenPeiZhi> .Get("picture").num;

        this.commonData.descID = DataReader <FJingYanFuBenPeiZhi> .Get("descId").num;
    }
コード例 #3
0
    public void OnBuyDefendTimes(SpecialFightMode mode)
    {
        DefendFightModeInfo defendFightModeInfo = SpecialFightManager.GetSpecialFightInfo(mode) as DefendFightModeInfo;

        if (defendFightModeInfo == null)
        {
            return;
        }
        SpecialFightCommonTableData specialFightCommonTableData = SpecialFightManager.GetSpecialFightCommonTableData(mode);

        if (specialFightCommonTableData == null)
        {
            return;
        }
        int todayBuyTimes    = defendFightModeInfo.todayBuyTimes;
        int todayCanBuyTimes = defendFightModeInfo.todayCanBuyTimes;
        int canBuyTimes      = Math.Max(todayCanBuyTimes - todayBuyTimes, 0);

        if (canBuyTimes <= 0 && todayBuyTimes < specialFightCommonTableData.priceList.get_Count())
        {
            string chineseContent = GameDataUtils.GetChineseContent(505105, false);
            DialogBoxUIViewModel.Instance.ShowAsOKCancel(GameDataUtils.GetChineseContent(621264, false), chineseContent, null, delegate
            {
                LinkNavigationManager.OpenVIPUI2Privilege();
            }, "取 消", "确 定", "button_orange_1", "button_yellow_1", null, true, true);
            return;
        }
        if (todayBuyTimes >= specialFightCommonTableData.priceList.get_Count())
        {
            DialogBoxUIViewModel.Instance.ShowAsConfirm(GameDataUtils.GetChineseContent(513531, false), GameDataUtils.GetChineseContent(513528, false), delegate
            {
            }, GameDataUtils.GetChineseContent(505114, false), "button_orange_1", null);
        }
        else
        {
            DialogBoxUIViewModel.Instance.ShowAsOKCancel_as(GameDataUtils.GetChineseContent(513531, false), string.Format(GameDataUtils.GetChineseContent(513530, false), specialFightCommonTableData.priceList.get_Item(todayBuyTimes), canBuyTimes, todayCanBuyTimes), null, null, delegate
            {
                if (canBuyTimes == 0)
                {
                    UIManagerControl.Instance.ShowToastText(GameDataUtils.GetChineseContent(513528, false), 1f, 1f);
                    DialogBoxUIViewModel.Instance.BtnRclose = false;
                }
                else
                {
                    DialogBoxUIViewModel.Instance.BtnRclose = true;
                    DefendFightManager.Instance.SendDefendFightBuyChallengeReq((DefendFightMode.DFMD)mode);
                }
            }, GameDataUtils.GetChineseContent(500012, false), GameDataUtils.GetChineseContent(500011, false), "button_orange_1", "button_yellow_1", null);
        }
    }
コード例 #4
0
    protected void InitTable()
    {
        this.commonTableInfo.Clear();
        SpecialFightCommonTableData specialFightCommonTableData = new SpecialFightCommonTableData();

        specialFightCommonTableData.dungeonID = DataReader <FShouHuShuiJingFuBenPeiZhi> .Get("dungeonId").num;

        specialFightCommonTableData.priceList.AddRange(DataReader <FShouHuShuiJingFuBenPeiZhi> .Get("price").date);
        specialFightCommonTableData.itemIDs.AddRange(DataReader <FShouHuShuiJingFuBenPeiZhi> .Get("ItemIds").date);
        specialFightCommonTableData.itemNums.AddRange(DataReader <FShouHuShuiJingFuBenPeiZhi> .Get("ItemNum").date);
        specialFightCommonTableData.picture = DataReader <FShouHuShuiJingFuBenPeiZhi> .Get("picture").num;

        specialFightCommonTableData.descID = DataReader <FShouHuShuiJingFuBenPeiZhi> .Get("descId").num;

        this.commonTableInfo.Add(DefendFightMode.DFMD.Hold, specialFightCommonTableData);
        SpecialFightCommonTableData specialFightCommonTableData2 = new SpecialFightCommonTableData();

        specialFightCommonTableData2.dungeonID = DataReader <FHuSongKuangCheFuBenPeiZhi> .Get("dungeonId").num;

        specialFightCommonTableData2.priceList.AddRange(DataReader <FHuSongKuangCheFuBenPeiZhi> .Get("price").date);
        specialFightCommonTableData2.itemIDs.AddRange(DataReader <FHuSongKuangCheFuBenPeiZhi> .Get("ItemIds").date);
        specialFightCommonTableData2.itemNums.AddRange(DataReader <FHuSongKuangCheFuBenPeiZhi> .Get("ItemNum").date);
        specialFightCommonTableData2.picture = DataReader <FHuSongKuangCheFuBenPeiZhi> .Get("picture").num;

        specialFightCommonTableData2.descID = DataReader <FHuSongKuangCheFuBenPeiZhi> .Get("descId").num;

        this.commonTableInfo.Add(DefendFightMode.DFMD.Protect, specialFightCommonTableData2);
        SpecialFightCommonTableData specialFightCommonTableData3 = new SpecialFightCommonTableData();

        specialFightCommonTableData3.dungeonID = DataReader <FXueCaiDianFengFuBenPeiZhi> .Get("dungeonId").num;

        specialFightCommonTableData3.priceList.AddRange(DataReader <FXueCaiDianFengFuBenPeiZhi> .Get("price").date);
        specialFightCommonTableData3.itemIDs.AddRange(DataReader <FXueCaiDianFengFuBenPeiZhi> .Get("ItemIds").date);
        specialFightCommonTableData3.itemNums.AddRange(DataReader <FXueCaiDianFengFuBenPeiZhi> .Get("ItemNum").date);
        specialFightCommonTableData3.picture = DataReader <FXueCaiDianFengFuBenPeiZhi> .Get("picture").num;

        specialFightCommonTableData3.descID = DataReader <FXueCaiDianFengFuBenPeiZhi> .Get("descId").num;

        this.commonTableInfo.Add(DefendFightMode.DFMD.Save, specialFightCommonTableData3);
    }
コード例 #5
0
    protected void OnUpdateDetailUI()
    {
        SpecialFightCommonTableData specialFightCommonTableData = SpecialFightManager.GetSpecialFightCommonTableData(this.currentMode);

        if (specialFightCommonTableData == null)
        {
            return;
        }
        Icon icon = DataReader <Icon> .Get(specialFightCommonTableData.picture);

        if (icon != null)
        {
            ResourceManager.SetTexture(this.InstanceRawImage, icon.icon);
        }
        for (int i = 0; i < this.DropInfoItem.get_childCount(); i++)
        {
            Object.Destroy(this.DropInfoItem.GetChild(i).get_gameObject());
        }
        for (int j = 0; j < specialFightCommonTableData.itemIDs.get_Count(); j++)
        {
            ItemShow.ShowItem(this.DropInfoItem, specialFightCommonTableData.itemIDs.get_Item(j), (long)specialFightCommonTableData.itemNums.get_Item(j), false, null, 2001);
        }
        this.DescribtionContent.set_text(GameDataUtils.GetChineseContent(specialFightCommonTableData.descID, false));
    }