Пример #1
0
        public void Update()
        {
            Transform transform = base.transform.Find("LeftTime");

            if (transform.gameObject.activeSelf)
            {
                ActivityDataItemBase.Status status = this._activityData.GetStatus();
                if (status == ActivityDataItemBase.Status.WaitToStart)
                {
                    string str;
                    transform.Find("TimeValue").GetComponent <Text>().text = Miscs.GetTimeSpanToShow(this._activityData.beginTime, out str).ToString();
                    transform.Find("Label").GetComponent <Text>().text     = str;
                }
                else if (status == ActivityDataItemBase.Status.InProgress)
                {
                    string str2;
                    transform.Find("TimeValue").GetComponent <Text>().text = Miscs.GetTimeSpanToShow(this._activityData.endTime, out str2).ToString();
                    transform.Find("Label").GetComponent <Text>().text     = str2;
                }
                else
                {
                    transform.gameObject.SetActive(false);
                }
            }
        }
Пример #2
0
        private void SetupDefaultActivityInfo()
        {
            this._contentGameObject.SetActive(true);
            this._nuclearExPanelGameObject.SetActive(false);
            this.SetupTitleView(this._activityData);
            this._lockGameObject.SetActive(false);
            this._waitToStartGameObject.SetActive(false);
            this._overGameObject.SetActive(false);
            this._inProgressGameObject.SetActive(false);
            switch (this._activityData.GetStatus())
            {
            case ActivityDataItemBase.Status.Unavailable:
                this._waitToStartGameObject.SetActive(true);
                this._waitToStartDescText.text = this._activityData.GetActivityLockDescription();
                this._leftTimeGameObject.SetActive(false);
                break;

            case ActivityDataItemBase.Status.Over:
                this._overGameObject.SetActive(true);
                break;

            case ActivityDataItemBase.Status.Locked:
            {
                this._lockGameObject.SetActive(true);
                object[] replaceParams = new object[] { this._activityData.GetMinPlayerLevelLimit() };
                this._lockDescText.text = LocalizationGeneralLogic.GetText("Menu_ActivityLock", replaceParams);
                break;
            }

            case ActivityDataItemBase.Status.WaitToStart:
                string str;
                this._waitToStartGameObject.SetActive(true);
                this._waitToStartDescText.text = this._activityData.GetActivityDescription();
                this._timeValueText.text       = Miscs.GetTimeSpanToShow(this._activityData.beginTime, out str).ToString();
                this._labelText.text           = str;
                break;

            case ActivityDataItemBase.Status.InProgress:
                this._inProgressGameObject.SetActive(true);
                this._inProgressDescText.text = this._activityData.GetActivityDescription();
                this._leftEnterTimeText.text  = (this._activityData.maxEnterTimes - this._activityData.enterTimes).ToString();
                break;
            }
        }
Пример #3
0
 public void Update()
 {
     if (this._activityData != null)
     {
         if (this._activityData.GetStatus() == ActivityDataItemBase.Status.WaitToStart)
         {
             string str;
             this._timeValueText.text = Miscs.GetTimeSpanToShow(this._activityData.beginTime, out str).ToString();
             this._labelText.text     = str;
         }
         if (this._activityData.GetActivityType() == 3)
         {
             if (this._activityData.GetStatus() == ActivityDataItemBase.Status.InProgress)
             {
                 this.SetupNuclearCountDown();
             }
             else
             {
                 Singleton <NotifyManager> .Instance.FireNotify(new Notify(NotifyTypes.RefreshChapterSelectPage, null));
             }
         }
     }
 }