Esempio n. 1
0
 public void SetCurStatu(bool isEnd, bool isWin = false)
 {
     if (item == null || item.Name == null)
     {
         return;
     }
     EnterIcon.spriteName = (isWin) ? "Ty_Legion_Shengli" : "Ty_Legion_Taotai";
     EnterIcon.gameObject.CustomSetActive(isEnd);
     WaitState.CustomSetActive(!isEnd);
 }
Esempio n. 2
0
        public void SetEndState(bool endState)
        {
            if (item == null || item.Name == null)
            {
                return;
            }
            EnterIcon.spriteName = (item.enter) ? "Ty_Legion_Shengli" : "Ty_Legion_Taotai";
            EnterIcon.gameObject.CustomSetActive(endState);
            if (!endState)
            {
                switch (type)
                {
                case WarType.Semifinal:
                {
                    int ts = -1;
                    if (LTLegionWarTimeLine.Instance != null)
                    {
                        ts = Convert.ToInt32(LTLegionWarTimeLine.Instance.SemiFinalStopTime - EB.Time.Now);
                    }
                    WaitState.GetComponent <UILabel>().text = WaitState.transform.GetChild(0).GetComponent <UILabel>().text = ts < 0 ? EB.Localizer.GetString("ID_codefont_in_LTLegionWarFinalController_4204") : EB.Localizer.GetString("ID_uifont_in_LTLegionWarJoin_StateLabel_5");
                }; break;

                case WarType.Final:
                {
                    int ts = -1;
                    if (LTLegionWarTimeLine.Instance != null)
                    {
                        ts = Convert.ToInt32(LTLegionWarTimeLine.Instance.FinalStopTime - EB.Time.Now);
                    }
                    WaitState.GetComponent <UILabel>().text = WaitState.transform.GetChild(0).GetComponent <UILabel>().text = ts < 0 ? EB.Localizer.GetString("ID_codefont_in_LTLegionWarFinalController_4204") : EB.Localizer.GetString("ID_uifont_in_LTLegionWarJoin_StateLabel_5");
                }; break;

                default: {
                    WaitState.GetComponent <UILabel>().text = WaitState.transform.GetChild(0).GetComponent <UILabel>().text = string.Empty;
                } break;
                }
            }
            WaitState.CustomSetActive(!endState);
        }