Beispiel #1
0
        public void SetRuneDesc()
        {
            if (ItemDepth <= 0)
            {
                return;
            }

            SSchemeRuneConfig runeConfig = RunePage.Instance.allRunePageTable[item.nRuneId] as SSchemeRuneConfig;

            if (runeConfig == null)
            {
                triggerTip.SetText(UTooltipParamName.BodyText, "EmptyDesc");
                return;
            }

            if (runeConfig.szParametersValueArray == "")
            {
                triggerTip.SetText(UTooltipParamName.BodyText, "EmptyDesc");
                return;
            }

            UBB.toHtml(ref runeConfig.szRuneDESC, UBB_FORMAT_TYPE.UGUI);
            triggerTip.SetText(UTooltipParamName.BodyText, runeConfig.szRuneDESC);
        }
Beispiel #2
0
        public Sprite GetIconByPrize(SSchemeActorPrizeConfig prizeConfig, WndID wndID)
        {
            if (prizeConfig == null)
            {
                return(null);
            }

            Sprite sprite = null;

            switch (prizeConfig.nPrizeType)
            {
            case (int)EMActorPrizeType.ACTOR_PRIZE_HERO:
            {
                int iconIndex;
                if (wndID == WndID.WND_ID_MAILBOX)
                {
                    iconIndex = 4;
                }
                else
                {
                    iconIndex = 3;
                }
                sprite = USpriteManager.Instance.GetSprite(USpriteManager.ESpriteType.EST_HeadPortrait, wndID, 1, iconIndex, prizeConfig.nPrizeParam[0]);
            }
            break;

            case (int)EMActorPrizeType.ACTOR_PRIZE_HEROCARD:
            {
                int iconIndex;
                if (wndID == WndID.WND_ID_MAILBOX)
                {
                    iconIndex = 4;
                }
                else
                {
                    iconIndex = 7;
                }
                sprite = USpriteManager.Instance.GetSprite(USpriteManager.ESpriteType.EST_HeadPortrait, wndID, 1, iconIndex, prizeConfig.nPrizeParam[0]);
            }
            break;

            case (int)EMActorPrizeType.ACTOR_PRIZE_RUNE:
            {
                SSchemeRuneConfig runeConfig = RunePage.Instance.allRunePageTable[prizeConfig.nPrizeParam[0]] as SSchemeRuneConfig;
                if (runeConfig != null)
                {
                    sprite = USpriteManager.Instance.GetSprite(USpriteManager.ESpriteType.EST_Rune, wndID, runeConfig.nRuneInlayType, runeConfig.nRuneIconId);
                }
            }
            break;

            case (int)EMActorPrizeType.ACTOR_PRIZE_HEROSKIN:
            {
                SkinInfoScheme skinConfig = new SkinInfoScheme();
                if (GameLogicAPI.GetHeroSkinInfo(prizeConfig.nPrizeParam[1], ref skinConfig))
                {
                    sprite = USpriteManager.Instance.GetSprite(USpriteManager.ESpriteType.EST_HeadPortrait, wndID, skinConfig.nSkinIconID, 3, prizeConfig.nPrizeParam[0]);
                }
            }
            break;

            default:
            {
                sprite = USpriteManager.Instance.GetSprite(USpriteManager.ESpriteType.EST_ActorPrize, wndID, prizeConfig.nPrizeType, prizeConfig.nPrizeIcon);
            }
            break;
            }

            return(sprite);
        }
Beispiel #3
0
        // 显示
        public void SetData(int nPrizeID, int nPrizeCount, bool bFirstWinType = false, bool bShowClan = false, bool bShowNoVave = false)
        {
            SSchemeActorPrizeConfig config = new SSchemeActorPrizeConfig();

            config = ActorPrizeConfig.Instance.GetActorPrizeConfig(nPrizeID);
            if (config != null)
            {
                if (config.nPrizeType == (int)EMActorPrizeType.ACTOR_PRIZE_GOLD && bFirstWinType)
                {
                    nPrizeCount = config.nPrizeParam[0];
                }

                if (nPrizeCount > 1)
                {
                    prizeName.text = String.Format("{0}+{1}", config.strPrizeName, nPrizeCount);
                }
                else
                {
                    prizeName.text = config.strPrizeName;
                }
                //prizeNum.text = nPrizeCount.ToString();
                prizeNum.gameObject.SetActive(false);
                if (config.nPrizeType == (int)EMActorPrizeType.ACTOR_PRIZE_HERO)
                {
                    prizeImage.sprite = USpriteManager.Instance.GetSprite(USpriteManager.ESpriteType.EST_HeadPortrait, WndID.WND_ID_TASK_UNFOLD, 1, 3, config.nPrizeParam[0]);
                }
                else if (config.nPrizeType == (int)EMActorPrizeType.ACTOR_PRIZE_HEROCARD)
                {
                    prizeImage.sprite = USpriteManager.Instance.GetSprite(USpriteManager.ESpriteType.EST_HeadPortrait, WndID.WND_ID_TASK_UNFOLD, 1, 7, config.nPrizeParam[0]);
                }
                else if (config.nPrizeType == (int)EMActorPrizeType.ACTOR_PRIZE_RUNE)
                {
                    SSchemeRuneConfig runeConfig = RunePage.Instance.allRunePageTable[config.nPrizeParam[0]] as SSchemeRuneConfig;
                    if (runeConfig != null)
                    {
                        prizeImage.sprite = USpriteManager.Instance.GetSprite(USpriteManager.ESpriteType.EST_Rune, WndID.WND_ID_TASK_UNFOLD, runeConfig.nRuneInlayType, runeConfig.nRuneIconId);
                    }
                }
                else if (config.nPrizeType == (int)EMActorPrizeType.ACTOR_PRIZE_HEROXPSKILL)
                {
                    prizeImage.sprite = USpriteManager.Instance.GetSprite(USpriteManager.ESpriteType.EST_ActorPrize, WndID.WND_ID_TASK_UNFOLD, config.nPrizeType, config.nPrizeIcon);
                }
                else if (config.nPrizeType == (int)EMActorPrizeType.ACTOR_PRIZE_HEROSKIN)
                {
                    SkinInfoScheme skinConfig = new SkinInfoScheme();
                    if (GameLogicAPI.GetHeroSkinInfo(config.nPrizeParam[1], ref skinConfig))
                    {
                        prizeImage.sprite = USpriteManager.Instance.GetSprite(USpriteManager.ESpriteType.EST_HeadPortrait, WndID.WND_ID_TASK_UNFOLD, skinConfig.nSkinIconID, 3, config.nPrizeParam[0]);
                    }
                }
                else
                {
                    prizeImage.sprite = USpriteManager.Instance.GetSprite(USpriteManager.ESpriteType.EST_ActorPrize, WndID.WND_ID_TASK_UNFOLD, config.nPrizeType, config.nPrizeIcon);
                }
                //prizeImage.sprite = USpriteManager.Instance.GetSprite(USpriteManager.ESpriteType.EST_ActorPrize, WndID.WND_ID_TASK_UNFOLD, config.nPrizeType, config.nPrizeIcon);

                String szDesc = config.strPrizeDesc;
                UBB.toHtml(ref szDesc, UBB_FORMAT_TYPE.UGUI);
                prizeTooltipTrigger.SetText(UTooltipParamName.BodyText, szDesc);

                //prizeName.gameObject.SetActive(!bShowClan);
                ClanIcon.gameObject.SetActive(bShowClan);
                if (bShowNoVave)
                {
                    prizeImage.color = UDefines.CommomColor(ECommonColor.ECC_Gray2);
                }
                else
                {
                    prizeImage.color = UDefines.CommomColor(ECommonColor.ECC_White);
                }
            }
            this.gameObject.SetActive(true);
        }