void Update() { if (WeekCardInfo.Instance.loginTime == 0) { WeekCardInfo.Instance.loginTime = ServerTimeKit.getLoginTime(); } if (ServerTimeKit.getMillisTime() >= BackPrizeLoginInfo.Instance.getSecondDayTime(WeekCardInfo.Instance.loginTime)) // 跨天// { WeekCardInfo.Instance.loginTime = ServerTimeKit.getMillisTime(); WeekCardInfoFPort fPort = FPortManager.Instance.getFPort("WeekCardInfoFPort") as WeekCardInfoFPort; fPort.WeekCardInfoAccess(updateWeekCardInfo); } if (isOnPressing) { mTime += 0.1f; if (mTime >= 3) { mTime = 0; isOnPressing = false; if (pressedPrizeView != null) { pressedPrizeView.DefaultClickEvent(); } } } }
public void initContent(WindowBase win) { fatherWindow = win; btn_receive.fatherWindow = fatherWindow; btn_buy.fatherWindow = fatherWindow; M_creatDayReward(); WeekCardInfoFPort fPort = FPortManager.Instance.getFPort("WeekCardInfoFPort") as WeekCardInfoFPort; fPort.WeekCardInfoAccess(updateWeekCardInfo); }
protected override void DoUpdate() { base.DoUpdate(); if (Time.frameCount % 50 == 0) { updateTime(); } if (flag) { if (topButtons.transform.localPosition.x < -120) { left.gameObject.SetActive(true); } else { left.gameObject.SetActive(false); } if (topButtons.transform.localPosition.x < -(indexxx - 6) * 110) { right.gameObject.SetActive(false); } else { right.gameObject.SetActive(true); } } if (NoticeManagerment.Instance.loginTime == 0) { NoticeManagerment.Instance.loginTime = ServerTimeKit.getLoginTime(); } if (ServerTimeKit.getMillisTime() >= BackPrizeLoginInfo.Instance.getSecondDayTime(NoticeManagerment.Instance.loginTime)) // 跨天// { NoticeManagerment.Instance.loginTime = ServerTimeKit.getMillisTime(); if (entranceId == NoticeEntranceType.BACK_NOTICE) // 回归// { BackPrizeInfoFPort bpif = FPortManager.Instance.getFPort("BackPrizeInfoFPort") as BackPrizeInfoFPort; bpif.BackPrizeLoginInfoAccess(updateTime); } if (entranceId == NoticeEntranceType.ZHOUNIANQING_NOTICE) // 福袋、周卡// { // 福袋// RebateInfoFPort rif = FPortManager.Instance.getFPort("RebateInfoFPort") as RebateInfoFPort; rif.RebateInfoAccess(updateTime); // 周卡// WeekCardInfoFPort wcif = FPortManager.Instance.getFPort("WeekCardInfoFPort") as WeekCardInfoFPort; wcif.WeekCardInfoAccess(updateTime); } } }
public void updateButton(json_Goods goods) { if (isBanner) { return; } if (sidList == null) { rmbCoverNumber = StringKit.toInt(goods.rate) * 3; doubleTag.SetActive(true); } else { if (sidList.Contains(goods.id)) { doubleTag.SetActive(false); } else { rmbCoverNumber = StringKit.toInt(goods.rate) * 3; if (goods.name != null && goods.type != 1 && goods.type != 2) { doubleTag.SetActive(true); } } } this.goods = goods; rmbLabel.text = LanguageConfigManager.Instance.getLanguage("moneyCover") + goods.amount; rmbCoverNum.text = goods.rate; rmbCoverNum.text = doubleTag.activeSelf ? rmbCoverNumber.ToString() : goods.rate; DiscLabel.text = goods.desc1; titleIcon.spriteName = goods.desc2; nameLabel.text = goods.name; if (goods.type == 0) { DiscLabel.gameObject.SetActive(doubleTag.activeSelf); } if (goods.type == 1) { doubleTag.SetActive(false); rmbCoverNum.gameObject.SetActive(false); if (NoticeManagerment.Instance.monthCardDueDate == null) { rmbCoverNum1.text = Language("monthCardName1"); } else { rmbCoverNum1.text = string.Format(Language("monthCardName2"), (NoticeManagerment.Instance.monthCardDueSeconds - ServerTimeKit.getSecondTime()) / 86400); } } if (goods.type == 2) { WeekCardInfoFPort fPort = FPortManager.Instance.getFPort("WeekCardInfoFPort") as WeekCardInfoFPort; fPort.WeekCardInfoAccess(() => { doubleTag.SetActive(false); rmbCoverNum.gameObject.SetActive(false); if (WeekCardInfo.Instance.weekCardState == WeekCardState.not_open) // 没有购买// { rmbCoverNum1.text = Language("weekCardName1"); } else { if (WeekCardInfo.Instance.endTime - ServerTimeKit.getSecondTime() > 0) { if ((WeekCardInfo.Instance.endTime - ServerTimeKit.getSecondTime()) / 86400 > 0) { // 显示剩余天数// rmbCoverNum1.text = string.Format(Language("weekCardName2"), (WeekCardInfo.Instance.endTime - ServerTimeKit.getSecondTime()) / 86400); } else { // 不足一天显示一天// rmbCoverNum1.text = string.Format(Language("weekCardName2"), 1); } } else { rmbCoverNum1.text = Language("weekCardName3"); } } }); } //没有充值再送,后面不显示 if (string.IsNullOrEmpty(goods.desc1) || goods.desc1 == "0") { //discountObj.gameObject.SetActive (false); } else { // discountObj.gameObject.SetActive (true); DiscLabel.text = goods.desc1; } }
// 周卡信息// void initWeekCardInfo() { WeekCardInfoFPort fPort = FPortManager.Instance.getFPort("WeekCardInfoFPort") as WeekCardInfoFPort; fPort.WeekCardInfoAccess(initRebateInfo); }