Esempio n. 1
0
    /// <summary>
    /// 刷新活动时间
    /// </summary>
    private void refreshNoticeTime()
    {
        long remainTime = noticeOpenTime - ServerTimeKit.getSecondTime();

        if (remainTime <= 0)
        {
            long remainCloseTime = noticeCloseTime - ServerTimeKit.getSecondTime();
            if (remainCloseTime >= 0)
            {
                timeLabel.gameObject.SetActive(true);
                timeLabel.text = sample.activiteDesc + "(" + closeTimeNoticeText.Replace("%1", TimeKit.timeTransformDHMS(remainCloseTime)) + ")";
            }
            else
            {
                timeLabel.gameObject.SetActive(false);
                timer.stop();
                timer = null;
            }
        }
        /** 还没开启 */
        else
        {
            timeLabel.gameObject.SetActive(true);
            timeLabel.text = openTimeNoticeText.Replace("%1", TimeKit.timeTransformDHMS(remainTime));
        }
    }
 void Update()
 {
     // 在任务时间期间//
     if (SevenDaysHappyManagement.Instance.getActiveMissonEndTime() - ServerTimeKit.getSecondTime() > 0)
     {
         timeTittle.text = LanguageConfigManager.Instance.getLanguage("sevenDaysHappy_missonEnd");
         timeValue.text  = TimeKit.timeTransformDHMS(SevenDaysHappyManagement.Instance.getActiveMissonEndTime() - ServerTimeKit.getSecondTime());
     }
     else
     {
         // 在领奖时间期间//
         if (SevenDaysHappyManagement.Instance.getEndTime() - ServerTimeKit.getSecondTime() > 0)
         {
             timeTittle.text = LanguageConfigManager.Instance.getLanguage("sevenDaysHappy_awardEnd");
             timeValue.text  = TimeKit.timeTransformDHMS(SevenDaysHappyManagement.Instance.getEndTime() - ServerTimeKit.getSecondTime());
         }
         else            // 整个活动结束//
         {
             timeValue.gameObject.SetActive(false);
             timeTittle.text = LanguageConfigManager.Instance.getLanguage("s0211");
             timeTittle.transform.localPosition = timeEndPos;
         }
         // 处理半价抢购//
         if (banjiaPanel.activeSelf)
         {
             banjia_goumaiBtn.disableButton(true);
         }
     }
 }
    /** 刷新活动时间 */
    private void refreshNoticeTime()
    {
        long remainTime = noticeOpenTime - ServerTimeKit.getSecondTime();

        if (remainTime <= 0)
        {
            long remainCloseTime = noticeCloseTime - ServerTimeKit.getSecondTime();
            if (remainCloseTime >= 0)
            {
                timeText.gameObject.SetActive(true);
                timeText.text = closeTimeNoticeText.Replace("%1", TimeKit.timeTransformDHMS(remainCloseTime));
            }
            else
            {
                timeText.gameObject.SetActive(false);
                timer.stop();
                timer = null;
                //时间到后所有按钮置灰
                LimitCollectItemUI[] items = content.GetComponentsInChildren <LimitCollectItemUI>();
                for (int i = 0; i < items.Length; i++)
                {
                    items[i].receiveButton.disableButton(true);
                }
                UiManager.Instance.createMessageLintWindow(LanguageConfigManager.Instance.getLanguage("notice37"));
            }
        }
        /** 还没开启 */
        else
        {
            timeText.gameObject.SetActive(true);
            timeText.text = openTimeNoticeText.Replace("%1", TimeKit.timeTransformDHMS(remainTime));
        }
    }
Esempio n. 4
0
    /** 刷新活动时间 */
    private void refreshNoticeTime()
    {
        long remainTime = noticeOpenTime - ServerTimeKit.getSecondTime();

        if (remainTime <= 0)
        {
            long remainCloseTime = noticeCloseTime - ServerTimeKit.getSecondTime();
            if (remainCloseTime >= 0)
            {
                freeDrawButton.disableButton(false);
                drawButton1.disableButton(false);
                drawButton2.disableButton(false);
                timeText.gameObject.SetActive(true);
                timeText.text = closeTimeNoticeText.Replace("%1", TimeKit.timeTransformDHMS(remainCloseTime));
            }
            else
            {
                freeDrawButton.disableButton(true);
                drawButton1.disableButton(false);
                drawButton2.disableButton(false);
                timeText.gameObject.SetActive(false);
                drawButton1.disableButton(true);
                drawButton2.disableButton(true);
            }
        }
        else
        {
            freeDrawButton.disableButton(true);
            drawButton1.disableButton(true);
            drawButton2.disableButton(true);
            timeText.gameObject.SetActive(true);
            timeText.text = openTimeNoticeText.Replace("%1", TimeKit.timeTransformDHMS(remainTime));
        }
    }
Esempio n. 5
0
 void UpdateInfo()
 {
     if ((pageIndex == 0 && MiningManagement.Instance.minerals[0] != null) || (pageIndex == 1 && MiningManagement.Instance.minerals[1] != null))
     {
         if (MiningManagement.Instance.GetRemainTime(pageIndex) > 0)
         {
             balanceInPage[pageIndex].SetActive(false);
             info.SetActive(true);
             remainTime.text        = TimeKit.timeTransformDHMS(MiningManagement.Instance.GetRemainTime(pageIndex));
             accumulativeValue.text = MiningManagement.Instance.GetBalance(pageIndex).ToString();
             speedValue.text        = LanguageConfigManager.Instance.getLanguage("s0043l3", ((int)(MiningManagement.Instance.GetSpeed(pageIndex) * 3600)).ToString() + "/");
         }
         else
         {
             info.SetActive(false);
             ShowBalance();
             balanceInPage[pageIndex].SetActive(true);
             HideTeam();
         }
     }
     else if (pageIndex == 2)
     {
         if (MiningManagement.Instance.HaveFightPrizes())
         {
             ShowBalance();
             balanceInPage[pageIndex].SetActive(true);
             HideTeam();
             fightButtonGroup.SetActive(false);
             fightInfo.SetActive(false);
         }
     }
 }
Esempio n. 6
0
 void Update()
 {
     if (timeObject.activeInHierarchy)
     {
         int time = selsetMounts.getMountsCloseTime() - ServerTimeKit.getSecondTime();
         timeLabel.text = TimeKit.timeTransformDHMS((double)time);
     }
 }
Esempio n. 7
0
    /** 刷新活动时间 */
    private void refreshNoticeTime()
    {
        long remainCloseTime = noticeCloseTime - ServerTimeKit.getSecondTime();

        if (remainCloseTime >= 0)
        {
            countdownTimeLabel.gameObject.SetActive(true);
            countdownTimeLabel.text = TimeKit.timeTransformDHMS(remainCloseTime);
        }
        else
        {
            countdownTimeLabel.gameObject.SetActive(false);
        }
    }
Esempio n. 8
0
 private void updateTime()
 {
     timeLabel.text = TimeKit.timeTransformDHMS(festivalwish.endTime - ServerTimeKit.getSecondTime()) + LanguageConfigManager.Instance.getLanguage("s0086");
     if (festivalwish.endTime - ServerTimeKit.getSecondTime() <= 0)
     {
         timeLabel.text = LanguageConfigManager.Instance.getLanguage("noticeActivityFW_12");
         wishButton.disableButton(true);
         wishButton.textLabel.text = LanguageConfigManager.Instance.getLanguage("noticeActivityFW_12");
         if (timer != null)
         {
             timer.stop();
             timer = null;
         }
     }
 }
Esempio n. 9
0
    private void showTime()
    {
        int now   = ServerTimeKit.getSecondTime();
        int start = activeTime.getDetailStartTime();
        int end   = activeTime.getDetailEndTime();

        noOpenTip.SetActive(false);
        if (now < start)
        {
            mTipsStr = "";
            //mTipsStr = Language ("doubleRMB_02") + TimeKit.timeTransformDHMS (start - now);
            noOpenTip.SetActive(true);
            time.text = Language("doubleRMB_02") + "\n" + TimeKit.timeTransformDHMS(start - now);
            desc.text = LanguageConfigManager.Instance.getLanguage("doubleRMB_06");
            UI_BtnSure.disableButton(true);
            UI_BtnSure.gameObject.SetActive(false);
        }
        else if (start <= now && now <= end)
        {
            UI_BtnSure.gameObject.SetActive(true);
            mTipsStr  = Language("doubleRMB_03") + TimeKit.timeTransformDHMS(end - now);
            desc.text = LanguageConfigManager.Instance.getLanguage("doubleRMB_07");
            UI_BtnSure.disableButton(false);
        }
        else
        {
            UI_BtnSure.gameObject.SetActive(true);
            mTipsStr         = Language("doubleRMB_04");
            btnSureName.text = LanguageConfigManager.Instance.getLanguage("doubleRMB_08");
            UI_BtnSure.disableButton(true);
            timer.stop();
            timer = null;
        }
        if (DoubleRMBManagement.Instance.isEnd)
        {
            mTipsStr         = Language("doubleRMB_04");
            desc.text        = LanguageConfigManager.Instance.getLanguage("doubleRMB_08");
            btnSureName.text = LanguageConfigManager.Instance.getLanguage("doubleRMB_09");
            UI_BtnSure.disableButton(true);
        }
        else
        {
            btnSureName.text = LanguageConfigManager.Instance.getLanguage("s0324");
        }
        UI_Time.text = mTipsStr;
    }
    /// <summary>
    /// 刷新活动时间
    /// </summary>
    private void refreshNoticeTime()
    {
        long remainTime = noticeOpenTime - ServerTimeKit.getSecondTime();

        if (remainTime <= 0)
        {
            long remainCloseTime = noticeCloseTime - ServerTimeKit.getSecondTime();
            if (remainCloseTime >= 0)
            {
                timeLabel.text = closeTimeNoticeText.Replace("%1", TimeKit.timeTransformDHMS(remainCloseTime));
            }
            else
            {
                //抽奖时间结束,进入只有兑换的阶段
                timeLabel.gameObject.SetActive(true);
                this.closeTimeNoticeText = LanguageConfigManager.Instance.getLanguage("superDraw_15");
                int[] sids = (notice.getSample().content as SidNoticeContent).sids;                //获取商店的时间sid
                activeTime = ActiveTime.getActiveTimeByID(sids[0]);
                int  shopCloseTime       = activeTime.getDetailEndTime();
                long remainShopClosetime = shopCloseTime - ServerTimeKit.getSecondTime();                //获取兑换商店剩余持续时间
                timeLabel.text = closeTimeNoticeText.Replace("%1", TimeKit.timeTransformDHMS(remainShopClosetime));

                endBottom.gameObject.SetActive(false);
                endTip.gameObject.SetActive(true);
                drawButton.disableButton(true);
                rechargeButton.gameObject.SetActive(false);

                if (remainShopClosetime <= 0)
                {
                    timeLabel.gameObject.SetActive(false);
                    timer1.stop();
                    timer1 = null;
                }
            }
        }
        //还没开启
        else
        {
            timeLabel.gameObject.SetActive(true);
            timeLabel.text = openTimeNoticeText.Replace("%1", TimeKit.timeTransformDHMS(remainTime));
        }
    }
Esempio n. 11
0
    private void updateTime()
    {
        activeTime = (notice as ConsumeRebateNotice).activeTime;
        activeTime.doRefresh();
        int now = ServerTimeKit.getSecondTime();

        if (activeTime.getEndTime() == 0)
        {
            timeLabel.text = Language("notice03");
        }
        else if (now < activeTime.getDetailStartTime())
        {
            //活动还未开启
            timeNoOpen.text = Language("ConsumeRebate_05", TimeKit.timeTransformDHMS(activeTime.getDetailStartTime() - now));
            timeLabel.gameObject.SetActive(false);
            offect.SetActive(false);
            noOpenObj.SetActive(true);
            //timeLabel.text = Language ("ConsumeRebate_05", TimeKit.timeTransformDHMS (activeTime.getDetailStartTime () - now));
        }
        else if (activeTime.getDetailStartTime() <= now && now < activeTime.getDetailEndTime())
        {
            timeLabel.gameObject.SetActive(true);
            offect.SetActive(true);
            offect.transform.localPosition = new Vector3(0f, 17f, 0f);
            noOpenObj.SetActive(false);
            timeLabel.text = Language("ConsumeRebate_06", TimeKit.timeTransformDHMS(activeTime.getDetailEndTime() - now));
        }
        else
        {
            timeLabel.text = Language("s0211");
            timeLabel.gameObject.SetActive(true);
            offect.SetActive(true);
            offect.transform.localPosition = new Vector3(0f, 17f, 0f);
            noOpenObj.SetActive(false);
            OnDisable();
        }
    }
Esempio n. 12
0
    public void updateTime()
    {
        if (!isEnable || timeUp)
        {
            return;
        }
        string str = "";

        switch (data.type)
        {
        case EnumArena.arena:
            if (isEnable)
            {
                if (ArenaManager.instance.stateEndTime <= ServerTimeKit.getSecondTime())
                {
                    timeUp = true;
                }
                string timeStr = TimeKit.timeTransformDHMS(ArenaManager.instance.stateEndTime - ServerTimeKit.getSecondTime());
                int    state   = ArenaManager.instance.state;
                if (state == ArenaManager.STATE_WAIT || state == ArenaManager.STATE_RESET)
                {
                    str = LanguageConfigManager.Instance.getLanguage("Arena58", timeStr);
                }
                else if (state == ArenaManager.STATE_MASS_RESET || state == ArenaManager.STATE_MASS)
                {
                    str = LanguageConfigManager.Instance.getLanguage("Arena59", timeStr);
                }
                else if (state == ArenaManager.STATE_64_32)
                {
                    str = LanguageConfigManager.Instance.getLanguage("Arena60", timeStr);
                }
                else if (state == ArenaManager.STATE_32_16)
                {
                    str = LanguageConfigManager.Instance.getLanguage("Arena61", timeStr);
                }
                else if (state == ArenaManager.STATE_16_8)
                {
                    str = LanguageConfigManager.Instance.getLanguage("Arena62", timeStr);
                }
                else if (state == ArenaManager.STATE_8_4)
                {
                    str = LanguageConfigManager.Instance.getLanguage("Arena65", timeStr);
                }
                else if (state == ArenaManager.STATE_4_2)
                {
                    str = LanguageConfigManager.Instance.getLanguage("Arena63", timeStr);
                }
                else if (state == ArenaManager.STATE_CHAMPION)
                {
                    str = LanguageConfigManager.Instance.getLanguage("Arena64", timeStr);
                }
                else if (state == ArenaManager.STATE_RESET)
                {
                    str = LanguageConfigManager.Instance.getLanguage("Arena59", timeStr);
                }
            }
//
            label_Time.text = str;
            break;

        case EnumArena.ladders:
//
            if (isEnable)
            {
                if (!LaddersManagement.Instance.Award.hasReceive)
                {
                    label_Time.text = Language("laddersTip_19");
                }
                else
                {
                    if (LaddersManagement.Instance.nextTime <= ServerTimeKit.getSecondTime())
                    {
                        timeUp          = true;
                        label_Time.text = Language("laddersTip_34");
                    }
                    else
                    {
                        string timeStr = TimeKit.timeTransformDHMS(Mathf.Max(LaddersManagement.Instance.nextTime - ServerTimeKit.getSecondTime(), 0));
                        label_Time.text = Language("ArenaNavigateTip_4", timeStr);
                    }
                }
            }
            break;

        case EnumArena.mineral:
            root_userInfo.SetActive(false);

            break;
        }
    }
Esempio n. 13
0
 // 开奖倒计时//
 public void updateAwardNumCountTime()
 {
     if (CommandConfigManager.Instance.getLotteryData().awardNumEndTime >= ServerTimeKit.getCurrentSecond())
     {
         timeCountLabel.text = string.Format(LanguageConfigManager.Instance.getLanguage("lottery_timeCount"), TimeKit.timeTransformDHMS(CommandConfigManager.Instance.getLotteryData().awardNumEndTime - ServerTimeKit.getCurrentSecond()));
     }
     else
     {
         timeCount.SetActive(false);
     }
 }