Exemplo n.º 1
0
    // Token: 0x06001BE3 RID: 7139 RVA: 0x00318D18 File Offset: 0x00316F18
    public void UpdateUI()
    {
        if (this.Type != 0)
        {
            return;
        }
        ArenaManager instance = ArenaManager.Instance;

        this.m_StrRank.ClearString();
        this.m_StrStrength.ClearString();
        this.m_StrName.ClearString();
        for (int i = 0; i < 5; i++)
        {
            if (instance.m_ArenaTargetHint.HeroData != null && instance.m_ArenaTargetHint.HeroData[i].ID != 0)
            {
                this.m_HeroBtn[i].gameObject.SetActive(true);
                this.m_Frame[i].gameObject.SetActive(false);
                GUIManager.Instance.ChangeHeroItemImg(this.m_HeroBtn[i].transform, eHeroOrItem.Hero, instance.m_ArenaTargetHint.HeroData[i].ID, instance.m_ArenaTargetHint.HeroData[i].Star, instance.m_ArenaTargetHint.HeroData[i].Rank, (int)instance.m_ArenaTargetHint.HeroData[i].Level);
                if (instance.CheckHeroAstrology(instance.m_ArenaTargetHint.HeroData[i].ID))
                {
                    this.m_Astrology[i].gameObject.SetActive(true);
                }
                else
                {
                    this.m_Astrology[i].gameObject.SetActive(false);
                }
            }
            else
            {
                this.m_Astrology[i].gameObject.SetActive(false);
                this.m_HeroBtn[i].gameObject.SetActive(false);
                this.m_Frame[i].gameObject.SetActive(true);
            }
        }
        this.m_StrRank.IntToFormat((long)((ulong)instance.m_ArenaTargetHint.Place), 1, true);
        this.m_StrRank.AppendFormat("{0}");
        this.m_TextRank.text = this.m_StrRank.ToString();
        this.m_TextRank.SetAllDirty();
        this.m_TextRank.cachedTextGenerator.Invalidate();
        this.m_StrStrength.IntToFormat((long)((ulong)instance.GetAllPower(0, 0)), 1, true);
        this.m_StrStrength.AppendFormat("{0}");
        this.m_TextStrength.text = this.m_StrStrength.ToString();
        this.m_TextStrength.SetAllDirty();
        this.m_TextStrength.cachedTextGenerator.Invalidate();
    }
Exemplo n.º 2
0
    // Token: 0x06001BDC RID: 7132 RVA: 0x00318100 File Offset: 0x00316300
    public void Show(UIButtonHint hint, float X = 0f, float Y = 0f, byte type = 0)
    {
        if (this.m_RectTransform.gameObject.activeSelf)
        {
            this.Hide(this.m_ButtonHint);
        }
        this.m_RectTransform.gameObject.SetActive(true);
        ArenaManager instance = ArenaManager.Instance;

        this.m_StrRank.ClearString();
        this.m_StrStrength.ClearString();
        this.m_StrName.ClearString();
        this.Type = type;
        if (this.Type == 0)
        {
            this.m_BGRectTransform.anchoredPosition = new Vector2(X, Y);
            this.m_BGRectTransform.gameObject.SetActive(true);
            this.m_BGRectTransform2.gameObject.SetActive(false);
            for (int i = 0; i < 5; i++)
            {
                if (instance.m_ArenaTargetHint.HeroData != null && instance.m_ArenaTargetHint.HeroData[i].ID != 0)
                {
                    this.m_HeroBtn[i].gameObject.SetActive(true);
                    this.m_Frame[i].gameObject.SetActive(false);
                    GUIManager.Instance.ChangeHeroItemImg(this.m_HeroBtn[i].transform, eHeroOrItem.Hero, instance.m_ArenaTargetHint.HeroData[i].ID, instance.m_ArenaTargetHint.HeroData[i].Star, instance.m_ArenaTargetHint.HeroData[i].Rank, (int)instance.m_ArenaTargetHint.HeroData[i].Level);
                    if (instance.CheckHeroAstrology(instance.m_ArenaTargetHint.HeroData[i].ID))
                    {
                        this.m_Astrology[i].gameObject.SetActive(true);
                    }
                    else
                    {
                        this.m_Astrology[i].gameObject.SetActive(false);
                    }
                }
                else
                {
                    this.m_Astrology[i].gameObject.SetActive(false);
                    this.m_HeroBtn[i].gameObject.SetActive(false);
                    this.m_Frame[i].gameObject.SetActive(true);
                }
            }
            this.m_StrRank.IntToFormat((long)((ulong)instance.m_ArenaTargetHint.Place), 1, true);
            this.m_StrRank.AppendFormat("{0}");
            this.m_TextRank.text = this.m_StrRank.ToString();
            this.m_TextRank.SetAllDirty();
            this.m_TextRank.cachedTextGenerator.Invalidate();
            this.m_StrStrength.IntToFormat((long)((ulong)instance.GetAllPower(0, 0)), 1, true);
            this.m_StrStrength.AppendFormat("{0}");
            this.m_TextStrength.text = this.m_StrStrength.ToString();
            this.m_TextStrength.SetAllDirty();
            this.m_TextStrength.cachedTextGenerator.Invalidate();
            CString cstring  = StringManager.Instance.StaticString1024();
            CString cstring2 = StringManager.Instance.StaticString1024();
            cstring.ClearString();
            cstring2.ClearString();
            cstring.Append(instance.m_ArenaTargetHint.Name);
            if (instance.m_ArenaTargetHint.AllianceTagTag != string.Empty)
            {
                cstring2.Append(instance.m_ArenaTargetHint.AllianceTagTag);
                GameConstants.FormatRoleName(this.m_StrName, cstring, cstring2, null, 0, 0, null, null, null, null);
            }
            else
            {
                GameConstants.FormatRoleName(this.m_StrName, cstring, null, null, 0, 0, null, null, null, null);
            }
            this.m_TextName.text = this.m_StrName.ToString();
            this.m_TextName.SetAllDirty();
            this.m_TextName.cachedTextGenerator.Invalidate();
        }
    }