/// <summary> /// 打开卡片选择窗口 /// </summary> private void openTeamEditWindow() { DateTime dt = TimeKit.getDateTimeMillis(ServerTimeKit.getMillisTime());//获取服务器时间 int dayOfWeek = TimeKit.getWeekCHA(dt.DayOfWeek); int nowOfDay = ServerTimeKit.getCurrentSecond(); int[] timeInfo = CommandConfigManager.Instance.getOneOnOneBossTimeInfo(); //开放时间 int[] data = CommandConfigManager.Instance.getOneOnOneBossData(); //开放日期 for (int i = 0; i < data.Length; i++) { if (dayOfWeek == data[i] && nowOfDay > timeInfo[0] && nowOfDay < timeInfo[1]) { if (AttackBossOneOnOneManager.Instance.canChallengeTimes + AttackBossOneOnOneManager.Instance.buyTimes <= 0) //次数用完 { UiManager.Instance.openDialogWindow <TextTipWindow>((win) => { win.init(LanguageConfigManager.Instance.getLanguage("OneOnOneBoss_033"), 0.8f); }); return; } UiManager.Instance.openWindow <CardSelectWindow>((win) => { win.Initialize(CardChooseWindow.CHATSHOW); }); return; } } UiManager.Instance.openDialogWindow <TextTipWindow>((win) => {//没开启活动 win.init(LanguageConfigManager.Instance.getLanguage("OneOnOneBoss_018"), 0.8f); }); }
private void checkTime() { if (buttonPray != null) { int nowTime = ServerTimeKit.getCurrentSecond(); //在活动时间内 if ((nowTime > beginTime) && (nowTime < endTime)) { if (coolTime > 0) { buttonPray.disableButton(true); } else { buttonPray.disableButton(false); } isActive = true; } else { isActive = false; buttonPray.disableButton(true); } setTimeText(); } else { if (timer != null) { timer.stop(); timer = null; } } }
/// <summary> /// 是否显示神秘商店的刷新标示 /// </summary> public bool isCanShowFlag(string type) { string falg = PlayerPrefs.GetString(UserManager.Instance.self.uid + "mysical" + type, "null"); if (ShopListSamleManager.Instance.getMyoPenLv() > UserManager.Instance.self.getUserLevel()) { return(false); } if (falg == "null") { return(true); } string[] times = falg.Split(':'); int dayofYear = ServerTimeKit.getDateTime().DayOfYear; int saveDay = StringKit.toInt(times[0]); if (dayofYear > saveDay) { return(true); } else if (dayofYear < saveDay) { return(false); } else { if (ServerTimeKit.getCurrentSecond() >= (StringKit.toInt(times[1]) * 60 * 60 + StringKit.toInt(times[2]) * 60 + StringKit.toInt(times[3]))) { return(true); } } return(false); }
protected override void begin() { base.begin(); nowTime.text = TimeKit.timeTransform(ServerTimeKit.getCurrentSecond() * 1000); content.reLoad(MysticalShopConfigManager.Instance.updateData); timer = TimerManager.Instance.getTimer(UserManager.TIMER_DELAY); timer.addOnTimer(refreshData); timer.start(); MaskWindow.UnlockUI(); }
// 开奖倒计时// 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); } }
public bool isActivityOpen() { int day = TimeKit.getWeekCHA(TimeKit.getDateTimeMillis(ServerTimeKit.getMillisTime()).DayOfWeek); for (int i = 0; i < CommandConfigManager.Instance.getLotteryData().openTime.Length; i++) { if (day == CommandConfigManager.Instance.getLotteryData().openTime[i] && ServerTimeKit.getCurrentSecond() < CommandConfigManager.Instance.getLotteryData().selectNumEndTime) { return(true); } } return(false); }
/// <summary> /// 得到下次刷新的时间差 /// </summary> /// <returns>The next flush time.</returns> public long getNextFlushTime() { string temp = getUseData(); string[] temps = temp.Split(':'); long nowTime = ServerTimeKit.getCurrentSecond() * 1000; //现在的时间 long timeLoading = (StringKit.toInt(temps[0]) * 60 + StringKit.toInt(temps[1])) * 60 * 1000 - nowTime; //时间差 if (timeLoading < 0) { timeLoading = 24 * 60 * 60 * 1000 - nowTime + (StringKit.toInt(temps[0]) * 60 + StringKit.toInt(temps[1])) * 60 * 1000; } return(timeLoading); }
public bool bossFightIsOpen() { DateTime dt = TimeKit.getDateTimeMillis(ServerTimeKit.getMillisTime());//获取服务器时间 int dayOfWeek = TimeKit.getWeekCHA(dt.DayOfWeek); int nowOfDay = ServerTimeKit.getCurrentSecond(); int[] timeInfo = CommandConfigManager.Instance.getOneOnOneBossTimeInfo(); //开放时间 int[] data = CommandConfigManager.Instance.getOneOnOneBossData(); //开放日期 for (int i = 0; i < data.Length; i++) { if (dayOfWeek == data[i] && (nowOfDay >= timeInfo[0] && nowOfDay <= timeInfo[1])) { return(true); } } return(false); }
private void updateNoticeWindow() { int currentSecond = ServerTimeKit.getCurrentSecond(); if (currentSecond == ALLSECONDSOFDAY && ServerTimeKit.getSecondTime() < activeTime.getEndTime()) //凌晨0点刷新界面 { initButton(); } if (ServerTimeKit.getSecondTime() >= activeTime.getEndTime() || !notice.isValid()) //活动结束,刷新整个活动界面 { if (UiManager.Instance.getWindow <NoticeWindow>() != null) { UiManager.Instance.getWindow <NoticeWindow>().initTopButton(); } timer.stop(); } }
private void updateInfo() { DateTime dt = TimeKit.getDateTimeMillis(ServerTimeKit.getMillisTime());//获取服务器时间 int dayOfWeek = TimeKit.getWeekCHA(dt.DayOfWeek); int nowOfDay = ServerTimeKit.getCurrentSecond(); int[] timeInfo = CommandConfigManager.Instance.getOneOnOneBossTimeInfo(); //开放时间 int[] data = CommandConfigManager.Instance.getOneOnOneBossData(); //开放日期 for (int i = 0; i < data.Length; i++) { // if (dayOfWeek == data[i] && (nowOfDay == timeInfo[0] || nowOfDay == timeInfo[1])) { // GetBossAttackFPort fport = FPortManager.Instance.getFPort("GetBossAttackFPort") as GetBossAttackFPort; // fport.access(CommandConfigManager.Instance.getBossFightSid(), updateUI); // return; // } if (dayOfWeek == data[i] && (nowOfDay >= timeInfo[0] && nowOfDay <= timeInfo[1])) { updateNotOpen = true; if (updateOpen) { updateOpen = false; GetBossAttackFPort fport = FPortManager.Instance.getFPort("GetBossAttackFPort") as GetBossAttackFPort; fport.access(CommandConfigManager.Instance.getBossFightSid(), updateUI); } updateTime(timeInfo, nowOfDay); } else { updateOpen = true; if (updateNotOpen) { updateNotOpen = false; updateUIForNotOpen(); } } } }
void Update() { if (RankManagerment.Instance.updateRankItemTotalDamage) { RankManagerment.Instance.updateRankItemTotalDamage = false; RankManagerment.Instance.loadData(RankManagerment.TYPE_BOSSDAMAGE, updateUI); } dt = TimeKit.getDateTimeMillis(ServerTimeKit.getMillisTime()); //获取服务器时间 dayOfWeek = TimeKit.getWeekCHA(dt.DayOfWeek); nowOfDay = ServerTimeKit.getCurrentSecond(); // 活动中// for (int i = 0; i < data.Length; i++) { if (dayOfWeek == data[i] && (nowOfDay >= timeInfo[0] && nowOfDay <= timeInfo[1])) { if (lblMyRank.transform.localPosition != lblMyRankOldPos && buttonHelp.localPosition != buttonHelpOldPos) { lalAward.gameObject.SetActive(true); awardIcon.SetActive(true); lblMyRank.transform.localPosition = lblMyRankOldPos; buttonHelp.localPosition = buttonHelpOldPos; } } // 活动未开// else { if (lblMyRank.transform.localPosition != lblMyRankMidPosObj.localPosition && buttonHelp.localPosition != buttonHelpMidPosObj.localPosition) { lalAward.gameObject.SetActive(false); awardIcon.SetActive(false); lblMyRank.transform.localPosition = lblMyRankMidPosObj.localPosition; buttonHelp.localPosition = buttonHelpMidPosObj.localPosition; } } } }
// 每一秒执行// void updateTime() { // 活动开启中// if (isActivityOpen()) { // 开奖后刷新// if (ServerTimeKit.getCurrentSecond() == CommandConfigManager.Instance.getLotteryData().awardNumEndTime) { LotteryInfoFPort fPort = FPortManager.Instance.getFPort("LotteryInfoFPort") as LotteryInfoFPort; fPort.lotteryInfoAccess(() => { initRadioLabels(); selfListContent.reLoad(); showAwardNum(true); }); } // 选号阶段// if (ServerTimeKit.getCurrentSecond() <= CommandConfigManager.Instance.getLotteryData().selectNumEndTime&& ServerTimeKit.getCurrentSecond() > 0) { if (isUpdateSelectNumPhase) { setUpdateSelectNumFalse(); // 处于界面跨天刷新// if (LotteryManagement.Instance.canGetInitFPort) { LotteryInfoFPort fPort = FPortManager.Instance.getFPort("LotteryInfoFPort") as LotteryInfoFPort; fPort.lotteryInfoAccess(() => { updateSelectNumPhase(); setSelectAwardsCountTips(); setSelectNumCountTips(); }); } else { updateSelectNumPhase(); } } } // 开奖倒计时阶段// else if (ServerTimeKit.getCurrentSecond() > CommandConfigManager.Instance.getLotteryData().selectNumEndTime&& ServerTimeKit.getCurrentSecond() <= CommandConfigManager.Instance.getLotteryData().awardNumEndTime) { if (isUpdateAwardNumPhase) { if (LotteryManagement.Instance.awardResult != "-1") { if (isUpdateSendAwardPhase) { setUpdateSendAwardFalse(); updateSendAwardPhase(); } } else { setUpdateAwardNumFalse(); updateAwardNumPhase(); } } } // 发奖阶段// else if (ServerTimeKit.getCurrentSecond() > CommandConfigManager.Instance.getLotteryData().awardNumEndTime&& ServerTimeKit.getCurrentSecond() <= CommandConfigManager.Instance.getLotteryData().sendAwardEndTime) { if (isUpdateSendAwardPhase) { setUpdateSendAwardFalse(); updateSendAwardPhase(); } } else { if (isUpdateFinishPhase) { setUpdateFinishFalse(); updateFinishPhase(); } } } else { if (!LotteryManagement.Instance.canGetInitFPort) { LotteryManagement.Instance.canGetInitFPort = true; } if (isUpdatePreViewPhase) { setUpdatePreViewFalse(); updateFinishPhase(); } } if (moneyTips.activeSelf) { if (moneyTimeCount >= CommandConfigManager.Instance.getLotteryData().updateLotteryMoneyTime) { moneyTimeCount = 0; LotteryInfoFPort fPort = FPortManager.Instance.getFPort("LotteryInfoFPort") as LotteryInfoFPort; fPort.lotteryInfoAccess(() => { moneyTipsLabel.text = string.Format(LanguageConfigManager.Instance.getLanguage("lottery_gold"), LotteryManagement.Instance.moneyAward.ToString()); }); } else { moneyTimeCount++; } } if (timeCount.activeSelf) { updateAwardNumCountTime(); } }
public void updateTime() { if (noticeSample == null) { return; } if (tip == null) { return; } int type = noticeSample.type; int now = ServerTimeKit.getSecondTime(); int current = ServerTimeKit.getCurrentSecond(); if (type == NoticeType.HAPPY_TURN_SPRITE) { if (UserManager.Instance.self.getUserLevel() >= noticeSample.levelLimit && NoticeManagerment.Instance.turnSpriteData.num != 0) { tip.SetActive(true); tipLabel.text = NoticeManagerment.Instance.turnSpriteData.num.ToString(); } else if (tip.activeSelf) { tip.SetActive(false); } } else if (type == NoticeType.XIANSHI_HAPPY_TURN) { if (UserManager.Instance.self.getUserLevel() >= noticeSample.levelLimit && NoticeManagerment.Instance.xs_turnSpriteData.num != 0) { tip.SetActive(true); tipLabel.text = NoticeManagerment.Instance.xs_turnSpriteData.num.ToString(); } else if (tip.activeSelf) { tip.SetActive(false); } } else if (type == NoticeType.ALCHEMY) { if (!(NoticeManagerment.Instance.getAlchemyConsume() > 0)) { if (!tip.activeSelf) { tip.gameObject.SetActive(true); } } else if (tip.activeSelf) { tip.gameObject.SetActive(false); } } else if (type == NoticeType.HEROEAT) { int[] info = NoticeManagerment.Instance.getHeroEatInfo(); if (info != null && info [1] < now && now < info [2] && info [3] == 0) { if (!tip.activeSelf) { tip.gameObject.SetActive(true); } } else if (tip.activeSelf) { tip.gameObject.SetActive(false); } } else if (type == NoticeType.TOPUPNOTICE || type == NoticeType.COSTNOTICE || type == NoticeType.TIME_RECHARGE || type == NoticeType.NEW_RECHARGE || type == NoticeType.NEW_CONSUME) { List <Recharge> temps = RechargeManagerment.Instance.getValidRechargesByTime((noticeSample.content as SidNoticeContent).sids, now); if (temps == null || temps.Count == 0) { tip.gameObject.SetActive(false); } else { tip.gameObject.SetActive(true); tipLabel.text = temps.Count.ToString(); } } else if (type == NoticeType.NEW_EXCHANGE) { //List<Exchange> temps = ExchangeManagerment.Instance.getValidExchangesByTime ((noticeSample.content as NewExchangeNoticeContent).actives[0].exchangeSids, noticeSample.type, now); // if (temps == null || temps.Count == 0) { // tip.gameObject.SetActive (false); // }else{ // tip.gameObject.SetActive (true); // tipLabel.text = temps.Count.ToString (); // } int count = 0; for (int i = 0; i < (noticeSample.content as NewExchangeNoticeContent).actives.Length; i++) { count += (ExchangeManagerment.Instance.getValidExchangesByTime((noticeSample.content as NewExchangeNoticeContent).actives[i].exchangeSids, NoticeType.EXCHANGENOTICE, now)).Count; } if (count == 0) { tip.gameObject.SetActive(false); } else { tip.gameObject.SetActive(false); // tip.gameObject.SetActive (true); // tipLabel.text = count.ToString(); } } else if (type == NoticeType.EXCHANGENOTICE) { List <Exchange> temps = ExchangeManagerment.Instance.getValidExchangesByTime((noticeSample.content as SidNoticeContent).sids, noticeSample.type, now); if (temps == null || temps.Count == 0) { tip.gameObject.SetActive(false); } else if (noticeSample.sid != 4) { tip.gameObject.SetActive(true); tipLabel.text = temps.Count.ToString(); } else if (noticeSample.sid == 4) //vip兑换特殊处理 { if (PlayerPrefs.GetString(PlayerPrefsComm.VIP_EXCHANGE_TIP) == "ok") { tip.gameObject.SetActive(true); } else { tip.gameObject.SetActive(false); } } } else if (type == NoticeType.ONERMB) { int state = RechargeManagerment.Instance.getOneRmbState(); if (state != RechargeManagerment.ONERMB_STATE_VALID) { tip.gameObject.SetActive(false); } else { tip.gameObject.SetActive(true); } } else if (type == NoticeType.MONTHCARD) { int state = NoticeManagerment.Instance.getMonthCardRewardState(); if (state != NoticeManagerment.MONTHCARD_STATE_VALID) { tip.gameObject.SetActive(false); } else { tip.gameObject.SetActive(true); } } else if (type == NoticeType.HAPPY_SUNDAY) { int num = HappySundayManagerment.Instance.getCanReceiveNum(); tip.gameObject.SetActive(num > 0); if (tip.gameObject.activeSelf) { tipLabel.text = num.ToString(); } } else if (type == NoticeType.QUIZ_EXAM) { bool isEnbale = (notice as QuizNotice).isCanAnswer(); if (isEnbale) { tip.gameObject.SetActive(true); } else { tip.gameObject.SetActive(false); } } else if (type == NoticeType.QUIZ_SURVEY) { bool isEnbale = (notice as QuizNotice).isCanAnswer(); if (isEnbale) { tip.gameObject.SetActive(true); } else { tip.gameObject.SetActive(false); } } else if (type == NoticeType.DAILY_REBATE) { int num = 0; ArrayList dailyList = TaskManagerment.Instance.getDailyRebateTask(); for (int i = 0; i < dailyList.Count; i++) { if (TaskManagerment.Instance.isComplete(dailyList[i] as Task)) { num++; } } if (num > 0) { tip.gameObject.SetActive(true); tipLabel.text = num.ToString(); } else { tip.gameObject.SetActive(false); tipLabel.text = ""; } } else if (type == NoticeType.LIMIT_COLLECT) { int num = 0; foreach (int sid in (noticeSample.content as SidNoticeContent).sids) { LimitCollectSample sample = NoticeActiveManagerment.Instance.getActiveInfoBySid(sid) as LimitCollectSample; if (sample != null && sample.isCanReceive()) { num++; } } if (num > 0) { tip.gameObject.SetActive(true); tipLabel.text = num.ToString(); } else { tip.gameObject.SetActive(false); tipLabel.text = ""; } } else if (type == NoticeType.ONE_MANY_RECHARGE) { List <Recharge> temps = RechargeManagerment.Instance.getValidRechargesByTime((noticeSample.content as SidNoticeContent).sids, now); if (temps == null || temps.Count == 0) { tip.gameObject.SetActive(false); } else { tip.gameObject.SetActive(true); tipLabel.text = temps.Count.ToString(); } } else if (type == NoticeType.SUPERDRAW) { if (SuperDrawManagerment.Instance == null) { tip.gameObject.SetActive(false); return; } else { int count = SuperDrawManagerment.Instance.superDraw.canUseNum; if (count == 0) { tip.gameObject.SetActive(false); } else { tip.gameObject.SetActive(true); tipLabel.text = count.ToString(); } } } else if (type == NoticeType.SIGNIN) { SignInSample sample = SignInSampleManager.Instance.getSignInSampleBySid(StringKit.toInt(notice.sid + "" + ServerTimeKit.getCurrentMonth())); if (sample == null) { return; } List <int> sids = sample.daySids; if (!SignInManagerment.Instance.stateList.Contains(sids[ServerTimeKit.getDayOfMonth() - 1])) { tip.gameObject.SetActive(true); tipLabel.text = "1"; } else { tip.gameObject.SetActive(false); } } else if (type == NoticeType.SHAREDRAW) { if (ShareDrawManagerment.Instance.isFirstShare == 0 && ShareDrawManagerment.Instance.canDrawTimes == 0) { tip.gameObject.SetActive(true); tipLabel.text = "1"; } else if (ShareDrawManagerment.Instance.canDrawTimes != 0 && ShareDrawManagerment.Instance.isFirstShare == 0) { tip.gameObject.SetActive(true); tipLabel.text = (ShareDrawManagerment.Instance.canDrawTimes + 1).ToString(); } else if (ShareDrawManagerment.Instance.canDrawTimes != 0 && ShareDrawManagerment.Instance.isFirstShare != 0) { tip.gameObject.SetActive(true); tipLabel.text = ShareDrawManagerment.Instance.canDrawTimes.ToString(); } else { tip.gameObject.SetActive(false); } } else if (type == NoticeType.WEEKCARD) { if (WeekCardInfo.Instance.recevieState == WeekCardRecevieState.recevie) { tip.gameObject.SetActive(true); tipLabel.text = "1"; } else { tip.gameObject.SetActive(false); } } else if (type == NoticeType.BACK_PRIZE) { if (BackPrizeLoginInfo.Instance.loginDays <= BackPrizeInfoFPort.tottalLoginDays) { if (BackPrizeLoginInfo.Instance.loginDays - BackPrizeLoginInfo.Instance.receivedDays.Count > 0) { tip.gameObject.SetActive(true); tipLabel.text = (BackPrizeLoginInfo.Instance.loginDays - BackPrizeLoginInfo.Instance.receivedDays.Count).ToString(); } else { tip.gameObject.SetActive(false); } } else { if (BackPrizeInfoFPort.tottalLoginDays - BackPrizeLoginInfo.Instance.receivedDays.Count > 0) { tip.gameObject.SetActive(true); tipLabel.text = (BackPrizeInfoFPort.tottalLoginDays - BackPrizeLoginInfo.Instance.receivedDays.Count).ToString(); } else { tip.gameObject.SetActive(false); } } } else if (type == NoticeType.BACK_RECHARGE) { if (BackPrizeRechargeInfo.Instance.getCanRecevieCount() - BackPrizeRechargeInfo.Instance.getReceviedCount() > 0) { tip.gameObject.SetActive(true); tipLabel.text = (BackPrizeRechargeInfo.Instance.getCanRecevieCount() - BackPrizeRechargeInfo.Instance.getReceviedCount()).ToString(); } else { tip.gameObject.SetActive(false); } } else if (type == NoticeType.XIANSHI_FANLI) { if (RebateInfoManagement.Instance.canRecevieCount > 0) { tip.gameObject.SetActive(true); tipLabel.text = RebateInfoManagement.Instance.canRecevieCount.ToString(); } else { tip.gameObject.SetActive(false); } } else if (type == NoticeType.LOTTERY) { if (LotteryManagement.Instance.getLotteryCount() + LotteryManagement.Instance.selectedAwardCount > 0) { if ((notice as LotteryNotice).isActivityOpen()) { tip.gameObject.SetActive(true); tipLabel.text = (LotteryManagement.Instance.getLotteryCount() + LotteryManagement.Instance.selectedAwardCount).ToString(); } else { if (LotteryManagement.Instance.selectedAwardCount > 0) { tip.gameObject.SetActive(true); tipLabel.text = LotteryManagement.Instance.selectedAwardCount.ToString(); } else { tip.gameObject.SetActive(false); } } } else { tip.gameObject.SetActive(false); } } }
private void refreshData() { nowTime.text = TimeKit.timeTransform(ServerTimeKit.getCurrentSecond() * 1000); }
public int getFirstNotice(int[] _noticeIndexs) { //int currentTime=ServerTimeKit.getSecondTime(); //int current = ServerTimeKit.getCurrentSecond (); int count = 0; int type = 0; int now = ServerTimeKit.getSecondTime(); int current = ServerTimeKit.getCurrentSecond(); Notice notice; NoticeSample noticeSample; for (int i = 0, length = _noticeIndexs.Length; i < length; i++) { type = _noticeIndexs[i]; notice = getNoticeByType(type); if (notice == null) { continue; } noticeSample = notice.getSample(); if (type == NoticeType.TOPUPNOTICE || type == NoticeType.TIME_RECHARGE) { List <Recharge> temps_0 = RechargeManagerment.Instance.getValidRechargesByTime((noticeSample.content as SidNoticeContent).sids, now); if (temps_0 != null) { count = temps_0.Count; } } else if (type == NoticeType.ALCHEMY) { if (!(NoticeManagerment.Instance.getAlchemyConsume() > 0)) { count = 1; } } else if (type == NoticeType.COSTNOTICE) { List <Recharge> temps_1 = RechargeManagerment.Instance.getValidRechargesByTime((noticeSample.content as SidNoticeContent).sids, now); if (temps_1 != null) { count = temps_1.Count; } } else if (type == NoticeType.EXCHANGENOTICE) { List <Exchange> temps_2 = ExchangeManagerment.Instance.getValidExchangesByTime((noticeSample.content as SidNoticeContent).sids, noticeSample.type, now); if (temps_2 != null) { count = temps_2.Count; } } else if (type == NoticeType.MONTHCARD) { if (NoticeManagerment.Instance.getMonthCardRewardState() == NoticeManagerment.MONTHCARD_STATE_VALID) { count = 1; } } else if (type == NoticeType.HAPPY_TURN_SPRITE || type == NoticeType.XIANSHI_HAPPY_TURN) { if (UserManager.Instance.self.getUserLevel() >= noticeSample.levelLimit && HoroscopesManager.Instance.getBeginTime() < current && current < HoroscopesManager.Instance.getEndTime() && now > HoroscopesManager.Instance.getPrayTime()) { count = 1; } } else if (type == NoticeType.ONERMB) { if (RechargeManagerment.Instance.getOneRmbState() != RechargeManagerment.ONERMB_STATE_FINISHED) { count = 1; } } if (count > 0) { return(notice.sid); } } return(0); }
public void updateNotice(Notice newNotice) { if (newNotice == null) { return; } else { notice = newNotice; NoticeSample sample = NoticeSampleManager.Instance.getNoticeSampleBySid(notice.sid); if (sample.type == NoticeType.STICKNOTICE) { ResourcesManager.Instance.LoadAssetBundleTexture("texture/announcement/" + "announcement_" + sample.icon, background); } else { if (NoticeManagerment.Instance.isNoticeBySidDraw(notice.sid)) { noticing = true; } else { noticing = false; } button.fatherWindow = fatherWindow; button.UpdateTemp(notice); noticeName.text = sample.name; // time.text = timeTransform (newNotice.time[0]); if (notice.readed == 0) { readIcon.spriteName = NOREAD; } else { readIcon.spriteName = READED; } } if (notice.sid == 1) { GetStarInfoFPort fp = FPortManager.Instance.getFPort("GetStarInfoFPort") as GetStarInfoFPort; fp.access(() => { if (this == null || this.gameObject == null || win == null) { return; } int nowTime = ServerTimeKit.getCurrentSecond(); int beginTime = HoroscopesManager.Instance.getBeginTime(); int endTime = HoroscopesManager.Instance.getEndTime(); if ((nowTime > beginTime) && (nowTime < endTime) && HoroscopesManager.Instance.getPrayTime() <= ServerTimeKit.getSecondTime()) { msgNum.SetActive(true); num.text = "1"; } else { msgNum.SetActive(false); } }); // int nowTime = ServerTimeKit.getCurrentSecond (); // int beginTime = HoroscopesManager.Instance.getBeginTime (); // int endTime = HoroscopesManager.Instance.getEndTime (); // if ((nowTime > beginTime) && (nowTime < endTime)) { // msgNum.SetActive (true); // num.text = "1"; // } // else { // msgNum.SetActive (false); // } } } }