Ejemplo 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");
     }
 }
Ejemplo n.º 2
0
 public static void SetTimeTextForDayOfWeek(UILabel label, int totalSeconds, DateTime restTimeDate, bool useDateFormat = true)
 {
     if (totalSeconds > 0)
     {
         GUIBannerParts.SetActiveRestTime(true, label);
         int num  = totalSeconds / GUIBannerParts.DAY_SECONDS;
         int num2 = (totalSeconds - GUIBannerParts.DAY_SECONDS * num) / GUIBannerParts.HOUR_SECONDS;
         int num3 = (totalSeconds - GUIBannerParts.DAY_SECONDS * num - GUIBannerParts.HOUR_SECONDS * num2) / GUIBannerParts.MINUTES_SECONDS;
         int num4 = totalSeconds % GUIBannerParts.MINUTES_SECONDS;
         if (useDateFormat && 1 <= num)
         {
             GUIBannerParts.SetDateFormat(label, restTimeDate);
         }
         else if (num2 >= 1)
         {
             label.text = string.Format(StringMaster.GetString("CountDownHM"), num2 + GUIBannerParts.DAY_HOUR * num, num3);
         }
         else if (num3 >= 1)
         {
             label.text = string.Format(StringMaster.GetString("CountDownMS"), num3, num4);
         }
         else
         {
             label.text = string.Format(StringMaster.GetString("CountDownS"), num4);
         }
     }
     else
     {
         GUIBannerParts.SetActiveRestTime(true, label);
         label.text = StringMaster.GetString("CountDownEnd");
     }
 }
Ejemplo n.º 3
0
    private void TimeSetting()
    {
        int restTimeSeconds = GUIBannerParts.GetRestTimeSeconds(DateTime.Parse(this.bannerInfo.endTime));
        int secondToDays    = GUIBannerParts.GetSecondToDays(restTimeSeconds);
        int secondToHours   = GUIBannerParts.GetSecondToHours(restTimeSeconds);
        int secondToMinutes = GUIBannerParts.GetSecondToMinutes(restTimeSeconds);

        if (secondToDays > 0)
        {
            this.fukidashiLabel.text = StringMaster.GetString("ExchangeRemaining") + string.Format(StringMaster.GetString("SystemTimeD"), secondToDays);
        }
        else if (secondToHours > 0)
        {
            this.fukidashiLabel.text = StringMaster.GetString("ExchangeRemaining") + string.Format(StringMaster.GetString("SystemTimeH"), secondToHours);
        }
        else if (secondToMinutes > 0)
        {
            this.fukidashiLabel.text = StringMaster.GetString("ExchangeRemaining") + string.Format(StringMaster.GetString("SystemTimeM"), secondToMinutes);
        }
        else if (restTimeSeconds > 0)
        {
            this.fukidashiLabel.text = StringMaster.GetString("ExchangeRemaining") + string.Format(StringMaster.GetString("SystemTimeM"), 1);
        }
        else
        {
            this.fukidashiLabel.text = StringMaster.GetString("ExchangeCloseTitle");
            base.CancelInvoke("TimeSetting");
        }
    }
Ejemplo n.º 4
0
 public void SetMenuShowFlag(bool showFlag)
 {
     foreach (GUIListPartBS guilistPartBS in this.partObjs)
     {
         GUIBannerParts guibannerParts = (GUIBannerParts)guilistPartBS;
         guibannerParts.SetMenuShowFlag(showFlag);
     }
 }
Ejemplo n.º 5
0
 public void RefreshNewAlert()
 {
     foreach (GUIListPartBS guilistPartBS in this.partObjs)
     {
         GUIBannerParts guibannerParts = (GUIBannerParts)guilistPartBS;
         guibannerParts.SetNew();
     }
 }
Ejemplo n.º 6
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");
        }
    }
Ejemplo n.º 8
0
 public IEnumerator AllBuild(GameWebAPI.RespDataMA_BannerM dts)
 {
     base.InitBuild();
     this.partsCount = 0;
     if (base.selectCollider != null)
     {
         GameWebAPI.RespDataMA_BannerM.BannerM[] menuBannerList = dts.bannerM.Where((GameWebAPI.RespDataMA_BannerM.BannerM x) => x.actionType == "menu" && ServerDateTime.Now >= DateTime.Parse(x.startTime) && GUIBannerParts.GetRestTimeSeconds(DateTime.Parse(x.endTime)) > 0).ToArray <GameWebAPI.RespDataMA_BannerM.BannerM>();
         this.partsCount = menuBannerList.Length;
         List <GameWebAPI.RespDataMA_BannerM.BannerM> dtList = new List <GameWebAPI.RespDataMA_BannerM.BannerM>();
         for (int mm = 0; mm < menuBannerList.Length; mm++)
         {
             dtList.Add(menuBannerList[mm]);
         }
         dtList.Sort(delegate(GameWebAPI.RespDataMA_BannerM.BannerM a, GameWebAPI.RespDataMA_BannerM.BannerM b)
         {
             int num  = int.Parse(a.dispNum);
             int num2 = int.Parse(b.dispNum);
             return(num - num2);
         });
         for (int mm = 0; mm < dtList.Count; mm++)
         {
             menuBannerList[mm] = dtList[mm];
         }
         GUISelectPanelBSPartsUD.PanelBuildData pbd = base.CalcBuildData(1, this.partsCount, 1f, 1f);
         float ypos = pbd.startY;
         float xpos = pbd.startX;
         for (int i = 0; i < menuBannerList.Length; i++)
         {
             GameWebAPI.RespDataMA_BannerM.BannerM bannerInfo = menuBannerList[i];
             GameObject go = base.AddBuildPart();
             if (!(null == go))
             {
                 GUIBannerParts parts = go.GetComponent <GUIBannerParts>();
                 if (parts != null)
                 {
                     parts.name += menuBannerList[i].dispNum.ToString();
                     parts.SetOriginalPos(new Vector3(xpos, ypos, -5f));
                     parts.Data = bannerInfo;
                     parts.SetBGColor();
                     string path = AssetDataMng.GetWebAssetImagePath() + bannerInfo.img;
                     yield return(TextureManager.instance.Load(path, new Action <Texture2D>(parts.OnBannerReceived), this.timeOutSeconds, true));
                 }
                 ypos -= pbd.pitchH;
             }
         }
         base.height       = pbd.lenH;
         base.initLocation = true;
         base.InitMinMaxLocation(-1, 0f);
     }
     base.selectParts.SetActive(false);
     yield break;
 }
Ejemplo n.º 9
0
    private IEnumerator BuildBanner(GameWebAPI.RespDataMA_BannerM.BannerM banner)
    {
        GUIBannerParts parts = this.goScheduleBannerParts.GetComponent <GUIBannerParts>();

        if (parts != null)
        {
            parts.name += banner.dispNum.ToString();
            parts.Data  = banner;
            parts.SetBGColor();
            string path = AssetDataMng.GetWebAssetImagePath() + banner.img;
            yield return(TextureManager.instance.Load(path, new Action <Texture2D>(parts.OnBannerReceived), this.timeOutSeconds, true));
        }
        yield break;
    }
Ejemplo n.º 10
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");
     }
 }
Ejemplo n.º 11
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();
         }
     }
 }
Ejemplo n.º 14
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);
     }
 }
Ejemplo n.º 15
0
 public override void Show(Action <int> f, float sizeX, float sizeY, float aT)
 {
     base.HideDLG();
     if (CMD_QuestTOP.AreaData == null)
     {
         CMD_QuestTOP.AreaData = ClassSingleton <QuestData> .Instance.GetWorldAreaM_NormalByAreaId(ClassSingleton <QuestTOPAccessor> .Instance.nextStage.worldAreaId);
     }
     if (CMD_QuestTOP.AreaData == null || !CMD_QuestTOP.AreaData.isActive)
     {
         AppCoroutine.Start(this.CloseImmidiate_OpenQuestSelect(1), false);
         return;
     }
     if (CMD_QuestTOP.AreaData.data.type == "3" || CMD_QuestTOP.AreaData.data.type == "4")
     {
         RestrictionInput.StartLoad(RestrictionInput.LoadType.LARGE_IMAGE_MASK_ON);
         if (CMD_QuestTOP.AreaData.data.type == "3")
         {
             this.partsQuestPoint = this.goPartsPointROOT.GetComponent <PartsQuestPoint>();
         }
         else if (CMD_QuestTOP.AreaData.data.type == "4")
         {
             this.partsQuestPoint = this.goPartsPointWithoutRankingROOT.GetComponent <PartsQuestPoint>();
         }
         APIRequestTask apirequestTask = new APIRequestTask();
         apirequestTask.Add(ClassSingleton <QuestData> .Instance.RequestPointQuestInfo(CMD_QuestTOP.AreaData.data.worldAreaId, delegate(GameWebAPI.RespDataWD_PointQuestInfo resp)
         {
             this.pointInfo = resp;
             this.partsQuestPoint.PointInfo = this.pointInfo;
             this.partsQuestPoint.AreaData  = CMD_QuestTOP.AreaData;
             this.partsQuestPoint.ShowData();
         }, false));
         base.StartCoroutine(apirequestTask.Run(delegate
         {
             this.IntDLG(f, sizeX, sizeY, aT);
             RestrictionInput.EndLoad();
             if (CMD_QuestTOP.AreaData.data.type == "3")
             {
                 this.goPartsPointROOT.SetActive(true);
                 this.goPartsPointWithoutRankingROOT.SetActive(false);
             }
             else if (CMD_QuestTOP.AreaData.data.type == "4")
             {
                 this.goPartsPointROOT.SetActive(false);
                 this.goPartsPointWithoutRankingROOT.SetActive(true);
             }
         }, delegate(Exception nop)
         {
             RestrictionInput.EndLoad();
             this.ClosePanel(false);
         }, null));
     }
     else
     {
         this.goPartsPointROOT.SetActive(false);
         this.goPartsPointWithoutRankingROOT.SetActive(false);
         this.goScheduleBannerROOT.SetActive(false);
         this.goPartsDetailsROOT.SetActive(false);
         if (CMD_QuestTOP.AreaData.data.type == "6")
         {
             this.goPartsDetailsROOT.SetActive(true);
             PartsQuestDetails component    = this.goPartsDetailsROOT.GetComponent <PartsQuestDetails>();
             string            worldEventId = this.GetWorldEventId();
             component.worldEventId = worldEventId;
         }
         if (CMD_QuestTOP.AreaData.data.worldAreaId == "3")
         {
             IEnumerable <GameWebAPI.RespDataMA_BannerM.BannerM> source = DataMng.Instance().RespData_BannerMaster.bannerM.Where((GameWebAPI.RespDataMA_BannerM.BannerM _banner) => _banner.linkCategoryType == "9" && _banner.actionType == "menu" && ServerDateTime.Now >= DateTime.Parse(_banner.startTime) && GUIBannerParts.GetRestTimeSeconds(DateTime.Parse(_banner.endTime)) > 0);
             this.isScheduleBannerActive = (source.Count <GameWebAPI.RespDataMA_BannerM.BannerM>() >= 1);
             this.goScheduleBannerROOT.SetActive(this.isScheduleBannerActive);
             if (this.isScheduleBannerActive)
             {
                 IEnumerator routine = this.BuildBanner(source.ElementAt(0));
                 base.StartCoroutine(routine);
             }
         }
         this.IntDLG(f, sizeX, sizeY, aT);
     }
 }
Ejemplo n.º 16
0
 public static int GetSecondToMinutes(int totalSeconds)
 {
     return((totalSeconds - GUIBannerParts.DAY_SECONDS * GUIBannerParts.GetSecondToDays(totalSeconds) - GUIBannerParts.HOUR_SECONDS * GUIBannerParts.GetSecondToHours(totalSeconds)) / GUIBannerParts.MINUTES_SECONDS);
 }
Ejemplo n.º 17
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();
                }
            };
        }
    }