Exemplo n.º 1
0
 private void CountDown()
 {
     this.totalSeconds = GUIBannerParts.GetRestTimeSeconds(this.restTimeDate);
     if (this.WorldStageData.worldStageM.worldAreaId == "2")
     {
         if (this.totalSeconds >= 99999999)
         {
             if (this.IsMatchDayOfWeek(int.Parse(this.WorldStageData.worldStageM.worldStageId)))
             {
                 this.totalSeconds = GUIBannerParts.GetRestTimeOneDaySeconds(this.restTimeDate);
             }
             else
             {
                 this.totalSeconds = 0;
             }
         }
         GUIBannerParts.SetTimeTextForDayOfWeek(this.timeLabel, this.totalSeconds, this.restTimeDate, true);
     }
     else if (this.worldStageData.isViewRanking && this.worldStageData.isCounting)
     {
         this.timeLabel.text = StringMaster.GetString("QuestPointRankingCounting");
     }
     else if (this.totalSeconds < 99999999)
     {
         GUIBannerParts.SetTimeText(this.timeLabel, this.totalSeconds, this.restTimeDate);
     }
     else
     {
         this.timeLabel.text = string.Empty;
     }
     if (this.totalSeconds <= 0)
     {
         base.CancelInvoke("CountDown");
     }
 }
Exemplo n.º 2
0
    private void CountDown()
    {
        int restTimeSeconds = GUIBannerParts.GetRestTimeSeconds(this.restTimeDate);

        GUIBannerParts.SetTimeText(this.timeLabel, restTimeSeconds, this.restTimeDate);
        if (restTimeSeconds <= 0)
        {
            base.CancelInvoke("CountDown");
            this.CallBackClass  = null;
            this.MethodToInvoke = string.Empty;
        }
    }
    private void TimeSetting()
    {
        DateTime dateTime        = DateTime.Parse(CMD_ClearingHouse.exchangeResultInfo.endTime);
        int      restTimeSeconds = GUIBannerParts.GetRestTimeSeconds(dateTime);

        GUIBannerParts.SetTimeText(this.exchangeLimitLabel, restTimeSeconds, dateTime);
        this.exchangeLimitLabel.text = string.Format(StringMaster.GetString("ExchangeTimeLimit"), this.exchangeLimitLabel.text);
        if (0 >= restTimeSeconds)
        {
            base.CancelInvoke("TimeSetting");
        }
    }
Exemplo n.º 4
0
 private void CountDown()
 {
     this.restTimeDate = DateTime.Parse(this.gashaInfo.endTime);
     this.totalSeconds = GUIBannerParts.GetRestTimeSeconds(this.restTimeDate);
     if (this.totalSeconds < 99999999)
     {
         GUIBannerParts.SetTimeText(this.timeLabel, this.totalSeconds, this.restTimeDate);
     }
     else
     {
         this.timeLabel.text = StringMaster.GetString("GashaRegular");
     }
     if (0 >= this.totalSeconds)
     {
         base.CancelInvoke("CountDown");
     }
 }
Exemplo n.º 5
0
 public void ShowGUI(Texture buttonImage)
 {
     base.ShowGUI();
     this.bgSprite.color = this.normalBGColor;
     this.restTimeDate   = DateTime.Parse(this.gashaInfo.endTime);
     this.totalSeconds   = GUIBannerParts.GetRestTimeSeconds(this.restTimeDate);
     if (this.totalSeconds < 99999999)
     {
         GUIBannerParts.SetTimeText(this.timeLabel, this.totalSeconds, this.restTimeDate);
     }
     else
     {
         this.timeLabel.text = StringMaster.GetString("GashaRegular");
     }
     if (0 < this.totalSeconds)
     {
         base.InvokeRepeating("CountDown", 1f, 1f);
     }
     this.bannerTex.mainTexture = buttonImage;
     this.ShowAbleCount();
     this.SetNew();
 }
 private void CountDown()
 {
     this.totalSeconds = GUIBannerParts.GetRestTimeSeconds(this.restTimeDate);
     if (99999999 <= this.totalSeconds)
     {
         this.totalSeconds = GUIBannerParts.GetRestTimeOneDaySeconds(this.restTimeDate);
     }
     if (this.data.countDownDispFlg)
     {
         GUIBannerParts.SetTimeTextForDayOfWeek(this.ngTX_TIME_LIMIT, this.totalSeconds, this.restTimeDate, false);
     }
     else
     {
         GUIBannerParts.SetTimeText(this.ngTX_TIME_LIMIT, this.totalSeconds, this.restTimeDate);
     }
     if (0 >= this.totalSeconds)
     {
         this.ngTX_TIME_LIMIT.text = StringMaster.GetString("ExchangeCloseTitle");
         base.CancelInvoke("CountDown");
         this.DisableBuyButtons();
     }
 }
 private void SetTimeStatus()
 {
     if (this.data.closeTime == null)
     {
         this.ngTX_TIME_LIMIT.gameObject.SetActive(false);
         return;
     }
     this.restTimeDate = DateTime.Parse(this.data.closeTime);
     this.totalSeconds = GUIBannerParts.GetRestTimeSeconds(this.restTimeDate);
     if (this.data.countDownDispFlg)
     {
         if (99999999 <= this.totalSeconds)
         {
             this.totalSeconds = GUIBannerParts.GetRestTimeOneDaySeconds(this.restTimeDate);
         }
         GUIBannerParts.SetTimeTextForDayOfWeek(this.ngTX_TIME_LIMIT, this.totalSeconds, this.restTimeDate, false);
     }
     else if (99999999 > this.totalSeconds)
     {
         GUIBannerParts.SetTimeText(this.ngTX_TIME_LIMIT, this.totalSeconds, this.restTimeDate);
     }
     else
     {
         this.ngTX_TIME_LIMIT.text = string.Empty;
     }
     if (this.data.countDownDispFlg || !string.IsNullOrEmpty(this.ngTX_TIME_LIMIT.text))
     {
         if (0 < this.totalSeconds)
         {
             base.InvokeRepeating("CountDown", 1f, 1f);
         }
         else
         {
             this.ngTX_TIME_LIMIT.text = StringMaster.GetString("ExchangeCloseTitle");
             this.DisableBuyButtons();
         }
     }
 }
Exemplo n.º 8
0
 private void SetTimeStatus()
 {
     this.restTimeDate = this.worldStageData.wdi.closeTime;
     this.totalSeconds = GUIBannerParts.GetRestTimeSeconds(this.restTimeDate);
     if (this.WorldStageData.worldStageM.worldAreaId == ConstValue.QUEST_AREA_ID_EVENT)
     {
         if (this.totalSeconds >= 99999999)
         {
             if (this.IsMatchDayOfWeek(int.Parse(this.WorldStageData.worldStageM.worldStageId)))
             {
                 this.totalSeconds = GUIBannerParts.GetRestTimeOneDaySeconds(this.restTimeDate);
             }
             else
             {
                 this.totalSeconds = 0;
             }
         }
         GUIBannerParts.SetTimeTextForDayOfWeek(this.timeLabel, this.totalSeconds, this.restTimeDate, true);
     }
     else if (this.worldStageData.isViewRanking && this.worldStageData.isCounting)
     {
         this.timeLabel.text = StringMaster.GetString("QuestPointRankingCounting");
     }
     else if (this.totalSeconds < 99999999)
     {
         GUIBannerParts.SetTimeText(this.timeLabel, this.totalSeconds, this.restTimeDate);
     }
     else
     {
         this.timeLabel.text = string.Empty;
     }
     if ((this.WorldStageData.worldStageM.worldAreaId == ConstValue.QUEST_AREA_ID_EVENT || this.WorldStageData.worldStageM.worldAreaId == ConstValue.QUEST_AREA_ID_ADVENT) && 0 < this.totalSeconds)
     {
         base.InvokeRepeating("CountDown", 1f, 1f);
     }
 }
Exemplo n.º 9
0
    public void SetAction()
    {
        switch (this.ConvertStringToEnum())
        {
        case GUIBannerParts.LinkCategoryType.Quest:
            this.MethodToInvoke = "OnClickedQuest";
            break;

        case GUIBannerParts.LinkCategoryType.Shop:
            this.MethodToInvoke = "OnClickedShop";
            break;

        case GUIBannerParts.LinkCategoryType.Gasha:
            this.MethodToInvoke = "OnClickedGacha";
            break;

        case GUIBannerParts.LinkCategoryType.News:
            this.CallBackClass  = base.gameObject;
            this.MethodToInvoke = "InfoShortcut";
            break;

        case GUIBannerParts.LinkCategoryType.Event:
            this.MethodToInvoke = "OnClickedQuest";
            break;

        case GUIBannerParts.LinkCategoryType.Reinforcement:
            this.MethodToInvoke = "OnClickedTraining";
            break;

        case GUIBannerParts.LinkCategoryType.Evolution:
            this.MethodToInvoke = "OnClickedEvo";
            break;

        case GUIBannerParts.LinkCategoryType.Meal:
            this.MethodToInvoke = "OnClickedMeal";
            break;

        case GUIBannerParts.LinkCategoryType.Schedule:
            this.CallBackClass  = base.gameObject;
            this.MethodToInvoke = "ScheduleShortcut";
            break;

        default:
            global::Debug.LogError("error : バナーマスタ , linkCategoryType =" + (int)this.ConvertStringToEnum());
            break;
        }
        this.restTimeDate = DateTime.Parse(this.Data.endTime);
        int restTimeSeconds = GUIBannerParts.GetRestTimeSeconds(this.restTimeDate);

        GUIBannerParts.SetTimeText(this.timeLabel, restTimeSeconds, this.restTimeDate);
        if (0 < restTimeSeconds)
        {
            base.InvokeRepeating("CountDown", 1f, 1f);
        }
        if (this.doNewControl)
        {
            this.SetNew();
            GUICollider component = base.gameObject.GetComponent <GUICollider>();
            component.onTouchEnded += delegate(Touch touch, Vector2 pos, bool flag)
            {
                if (flag)
                {
                    this.ResetNew();
                }
            };
        }
    }