示例#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
    public override void ShowBattleUI()
    {
        if (base.InstanceResult != null)
        {
            return;
        }
        BattleUI battleUI = LinkNavigationManager.OpenBattleUI();

        battleUI.BtnQuitAction = delegate
        {
            UIManagerControl.Instance.OpenUI("GlobalBattleDialogUI", UINodesManager.MiddleUIRoot, false, UIType.NonPush);
            GlobalBattleDialogUIViewModel.Instance.ShowAsOKCancel_as(GameDataUtils.GetChineseContent(501002, false), GameDataUtils.GetChineseContent(513529, false), delegate
            {
                InstanceManager.TryPause();
            }, delegate
            {
                InstanceManager.TryResume();
                LinkNavigationManager.OpenBattleUI();
            }, delegate
            {
                InstanceManager.TryResume();
                EventDispatcher.Broadcast("GuideManager.InstanceExit");
                DefendFightManager.Instance.ExitDefendFightReq(false);
            }, GameDataUtils.GetNoticeText(103), GameDataUtils.GetNoticeText(102), "button_orange_1", "button_orange_1", null);
            GlobalBattleDialogUIView.Instance.isClick = false;
        };
        battleUI.ResetAllInstancePart();
        battleUI.ShowBattleTimeUI(true);
        battleUI.ShowSpecialInstanceBattleUI(true);
        battleUI.InitSpecialInstanceBattleUI();
        battleUI.IsPauseCheck = false;
        battleUI.IsInAuto     = (base.InstanceData.autoFight == 0);
        RewardPreviewUI.CopyType type = RewardPreviewUI.CopyType.NONE;
        switch (DefendFightManager.Instance.SelectDetailMode)
        {
        case DefendFightMode.DFMD.Hold:
            type = RewardPreviewUI.CopyType.GUARD;
            break;

        case DefendFightMode.DFMD.Protect:
            type = RewardPreviewUI.CopyType.ESCORT;
            break;

        case DefendFightMode.DFMD.Save:
            type = RewardPreviewUI.CopyType.ATTACK;
            break;
        }
        battleUI.ShowRewardPreviewUI(true, type, 0L, 0L);
    }
示例#3
0
    public void SetShowType(RewardPreviewUI.CopyType type)
    {
        this.mCopyType = type;
        this.SetDafaultUI();
        switch (type)
        {
        case RewardPreviewUI.CopyType.EXP:
        case RewardPreviewUI.CopyType.HOOK:
            this.mTxTitle.set_text(GameDataUtils.GetChineseContent(511608, false));
            this.mTxExpBatch.set_text(GameDataUtils.GetChineseContent(511609, false));
            this.mTxExp.get_gameObject().SetActive(true);
            break;

        case RewardPreviewUI.CopyType.GUARD:
        case RewardPreviewUI.CopyType.ESCORT:
        case RewardPreviewUI.CopyType.ATTACK:
            this.mTxTitle.set_text("已获得奖励");
            this.RefreshReward(type);
            break;

        case RewardPreviewUI.CopyType.GUILDWAR:
        {
            this.mTxExp.set_fontSize(32);
            this.mTxTitle.set_text("已采集资源");
            this.mTxExpBatch.set_text(string.Empty);
            this.mTxExp.get_gameObject().SetActive(true);
            this.mTxExpBatchNum.set_text(string.Empty);
            Icon icon = DataReader <Icon> .Get(5611);

            if (icon != null)
            {
                this.SetIconImage(icon.icon);
            }
            break;
        }
        }
    }