public override void OnNetResume() { base.OnNetResume(); LotteryInfoFPort fPort = FPortManager.Instance.getFPort("LotteryInfoFPort") as LotteryInfoFPort; fPort.lotteryInfoAccess(() => { LotteryManagement.Instance.canGetInitFPort = false; finishWindow(); UiManager.Instance.getWindow <NoticeWindow>().show.GetComponent <LotteryContent>().reSetMoneyTimeCount(); UiManager.Instance.getWindow <NoticeWindow>().show.GetComponent <LotteryContent>().initMainPanel(); UiManager.Instance.getWindow <NoticeWindow>().show.GetComponent <LotteryContent>().initRadioLabels(); UiManager.Instance.getWindow <NoticeWindow>().show.GetComponent <LotteryContent>().setTimer(); UiManager.Instance.getWindow <NoticeWindow>().show.GetComponent <LotteryContent>().setBoolTrue(); }); }
// 选注成功后刷新// void updateAfterSelect() { UiManager.Instance.openDialogWindow <MessageLineWindow>((win) => { win.Initialize(LanguageConfigManager.Instance.getLanguage("Lottery_selectSuccess")); }); updateBtnState(); LotteryManagement.Instance.selectNumList.Clear(); MaskWindow.UnlockUI(); LotteryInfoFPort fPort = FPortManager.Instance.getFPort("LotteryInfoFPort") as LotteryInfoFPort; fPort.lotteryInfoAccess(() => { LotteryManagement.Instance.canGetInitFPort = false; finishWindow(); UiManager.Instance.getWindow <NoticeWindow>().show.GetComponent <LotteryContent>().reSetMoneyTimeCount(); UiManager.Instance.getWindow <NoticeWindow>().show.GetComponent <LotteryContent>().initMainPanel(); UiManager.Instance.getWindow <NoticeWindow>().show.GetComponent <LotteryContent>().initRadioLabels(); UiManager.Instance.getWindow <NoticeWindow>().show.GetComponent <LotteryContent>().setTimer(); UiManager.Instance.getWindow <NoticeWindow>().show.GetComponent <LotteryContent>().setBoolTrue(); }); }
private void showDetail(NoticeTopButton button) { Notice notice = button.getNotice(); int type = notice.getSample().type; doSwitchBackGround(type); if (type == NoticeType.TOPUPNOTICE || type == NoticeType.COSTNOTICE || type == NoticeType.TIME_RECHARGE || type == NoticeType.NEW_RECHARGE || type == NoticeType.NEW_CONSUME) { Destroy(show); show = NGUITools.AddChild(showPos.gameObject, rechargeShow); show.transform.localPosition = Vector3.zero; show.transform.localScale = Vector3.one; show.GetComponent <NoticeActivityRechargeContent> ().initContent(notice, this); } else if (type == NoticeType.EXCHANGENOTICE || type == NoticeType.NEW_EXCHANGE) { Destroy(show); show = NGUITools.AddChild(showPos.gameObject, exchangeShow); show.transform.localPosition = Vector3.zero; show.transform.localScale = Vector3.one; show.GetComponent <NoticeActivityExchangeContent> ().initContent(notice, this); } else if (type == NoticeType.HEROEAT) { Destroy(show); show = NGUITools.AddChild(showPos.gameObject, heroEatShow); show.transform.localPosition = Vector3.zero; show.transform.localScale = Vector3.one; show.GetComponent <HeroEatContent> ().initContent(this); } else if (type == NoticeType.ALCHEMY) { Destroy(show); show = NGUITools.AddChild(showPos.gameObject, alchemyShow); show.transform.localPosition = Vector3.zero; show.transform.localScale = Vector3.one; show.GetComponent <AlchemyContent> ().initContent(this); } else if (type == NoticeType.CDKEY) { Destroy(show); show = NGUITools.AddChild(showPos.gameObject, inviteShow); show.transform.localPosition = Vector3.zero; show.transform.localScale = Vector3.one; show.GetComponent <InviteContent> ().initWindow(0, this); } else if (type == NoticeType.MONTHCARD) { Destroy(show); show = NGUITools.AddChild(showPos.gameObject, monthCardShow); show.transform.localPosition = Vector3.zero; show.transform.localScale = Vector3.one; show.GetComponent <MonthCardContent> ().initContent(this); } else if (type == NoticeType.HAPPY_TURN_SPRITE || type == NoticeType.XIANSHI_HAPPY_TURN) { Destroy(show); show = NGUITools.AddChild(showPos.gameObject, happyTurnSpriteShow); show.transform.localPosition = Vector3.zero; show.transform.localScale = Vector3.one; show.GetComponent <HappyTurnSpriteContent> ().initContent(notice, this); } else if (type == NoticeType.ONERMB) { Destroy(show); show = NGUITools.AddChild(showPos.gameObject, oneRmbShow); show.transform.localPosition = Vector3.zero; show.transform.localScale = Vector3.one; show.GetComponent <OneRmbContent> ().initContent(this); } else if (type == NoticeType.QUIZ_EXAM) { Destroy(show); show = NGUITools.AddChild(showPos.gameObject, quizShow); show.transform.localPosition = Vector3.zero; show.transform.localScale = Vector3.one; show.GetComponent <NoticeQuizContent> ().initData(this, notice); } else if (type == NoticeType.QUIZ_SURVEY) { Destroy(show); show = NGUITools.AddChild(showPos.gameObject, quizShow); show.transform.localPosition = Vector3.zero; show.transform.localScale = Vector3.one; show.GetComponent <NoticeQuizContent> ().initData(this, notice); } else if (type == NoticeType.HAPPY_SUNDAY) { Destroy(show); show = NGUITools.AddChild(showPos.gameObject, happySunday); show.transform.localPosition = Vector3.zero; show.transform.localScale = Vector3.one; show.GetComponent <HappySundayContent> ().initContent(this, notice); } else if (type == NoticeType.CONSUME_REBATE) { Destroy(show); show = NGUITools.AddChild(showPos.gameObject, consumeRebateShow); show.transform.localPosition = Vector3.zero; show.transform.localScale = Vector3.one; show.GetComponent <NoticeConsumeRebateContent> ().initContent(notice, this); } else if (type == NoticeType.LUCKY_CARD) { Destroy(show); show = NGUITools.AddChild(showPos.gameObject, luckyCardShow); show.transform.localPosition = Vector3.zero; show.transform.localScale = Vector3.one; show.GetComponent <LuckyCardContent> ().initContent(this, notice); } else if (type == NoticeType.LUCKY_EQUIP || type == NoticeType.XIANSHI_HUODONG) { Destroy(show); show = NGUITools.AddChild(showPos.gameObject, luckyEquipShow); show.transform.localPosition = Vector3.zero; show.transform.localScale = Vector3.one; show.GetComponent <LuckyEquipContent> ().initContent(this, notice); } else if (type == NoticeType.DOUBLE_RMB) { Destroy(show); show = NGUITools.AddChild(showPos.gameObject, doubleRMB); show.transform.localPosition = Vector3.zero; show.transform.localScale = Vector3.one; show.GetComponent <DoubleRMBContent> ().initContent(this, notice); } else if (type == NoticeType.REMAKE_EQUIP) { Destroy(show); show = NGUITools.AddChild(showPos.gameObject, equipRemakeShow); show.transform.localPosition = Vector3.zero; show.transform.localScale = Vector3.one; show.GetComponent <EquipRemakeContent> ().initContent(this, notice); } else if (type == NoticeType.DAILY_REBATE) { Destroy(show); show = NGUITools.AddChild(showPos.gameObject, dailyReateShow); show.transform.localPosition = Vector3.zero; show.transform.localScale = Vector3.one; //(FPortManager.Instance.getFPort ("InitLuckyDrawFPort") as InitLuckyDrawFPort).init (null); dailyRateList = TaskManagerment.Instance.getDailyRebateTask(); show.GetComponent <NoticeActivityDailyRebateContent> ().initContent(notice, this, dailyRateList); } else if (type == NoticeType.LADDER_HEGEMONY) { Destroy(show); show = NGUITools.AddChild(showPos.gameObject, ladderHegemoney); show.transform.localPosition = Vector3.zero; show.transform.localScale = Vector3.one; NoticeSample sample = NoticeSampleManager.Instance.getNoticeSampleBySid(notice.sid); Notice activenotice = NoticeManagerment.Instance.getNoticeListByType(NoticeType.LADDER_ACTION_TIME, notice.sid, sample.entranceId); show.GetComponent <NoticeLadderHegeMoneyContent> ().initContent(notice, this); show.GetComponent <NoticeLadderHegeMoneyContent> ().initActiveNotice(activenotice); } else if (type == NoticeType.LIMIT_COLLECT) { Destroy(show); show = NGUITools.AddChild(showPos.gameObject, limitCollect); show.transform.localPosition = Vector3.zero; show.transform.localScale = Vector3.one; show.GetComponent <NoticeActivityLimitCollectContent> ().initContent(notice, this); } else if (type == NoticeType.ONE_MANY_RECHARGE) { Destroy(show); show = NGUITools.AddChild(showPos.gameObject, oneManyShow); show.transform.localPosition = Vector3.zero; show.transform.localScale = Vector3.one; show.GetComponent <NoticeOneManyRechargeContent>().initContent(notice, this); } else if (type == NoticeType.FESTIVAL_WISH) { Destroy(show); show = NGUITools.AddChild(showPos.gameObject, festivalShow); show.transform.localPosition = Vector3.zero; show.transform.localScale = Vector3.one; show.GetComponent <NoticeActivityFestivalWishContent>().initContent(notice, this); } else if (type == NoticeType.FESTIVAL_FIREWORKS) { Destroy(show); show = NGUITools.AddChild(showPos.gameObject, fireworksShow); show.transform.localPosition = Vector3.zero; show.transform.localScale = Vector3.one; show.GetComponent <NoticeActivityFestivalFireworksContent>().initContent(notice, this); } else if (type == NoticeType.SUPERDRAW) { Destroy(show); show = NGUITools.AddChild(showPos.gameObject, superDrawShow); show.transform.localPosition = Vector3.zero; show.transform.localScale = Vector3.one; show.GetComponent <NoticeActivitySuperDrawContent>().initContent(notice, this); } else if (type == NoticeType.XIANSHI_FANLI) { Destroy(show); show = NGUITools.AddChild(showPos.gameObject, rebateShow); show.transform.localPosition = Vector3.zero; show.transform.localScale = Vector3.one; show.GetComponent <RebateContent>().initContent(notice, this); } else if (type == NoticeType.SIGNIN) { Destroy(show); show = NGUITools.AddChild(showPos.gameObject, signInShow); show.transform.localPosition = Vector3.zero; show.transform.localScale = Vector3.one; show.GetComponent <NoticeActivitySignInContent>().initContent(notice, this); } else if (type == NoticeType.SHAREDRAW) { Destroy(show); show = NGUITools.AddChild(showPos.gameObject, shareContent); show.transform.localPosition = Vector3.zero; show.transform.localScale = Vector3.one; show.GetComponent <ShareDrawContent>().initContent(notice, this); } else if (type == NoticeType.BACK_PRIZE) { Destroy(show); show = NGUITools.AddChild(showPos.gameObject, backPrizeShow); show.transform.localPosition = Vector3.zero; show.transform.localScale = Vector3.one; show.GetComponent <OldPlayerBackContent>().initContent(notice, this, button); } else if (type == NoticeType.BACK_RECHARGE) { Destroy(show); show = NGUITools.AddChild(showPos.gameObject, backRechargeShow); show.transform.localPosition = Vector3.zero; show.transform.localScale = Vector3.one; show.GetComponent <BackRechargeContent>().initContent(notice, this); } else if (type == NoticeType.WEEKCARD) { Destroy(show); show = NGUITools.AddChild(showPos.gameObject, weekCardShow); show.transform.localPosition = Vector3.zero; show.transform.localScale = Vector3.one; show.GetComponent <WeekCardContent>().initContent(this); } else if (type == NoticeType.LOTTERY) { Destroy(show); show = NGUITools.AddChild(showPos.gameObject, lotteryShow); show.transform.localPosition = Vector3.zero; show.transform.localScale = Vector3.one; LotteryInfoFPort fPort = FPortManager.Instance.getFPort("LotteryInfoFPort") as LotteryInfoFPort; fPort.lotteryInfoAccess(() => { LotteryManagement.Instance.canGetInitFPort = false; show.GetComponent <LotteryContent>().initContent(this, notice); }); } else { MessageWindow.ShowAlert(LanguageConfigManager.Instance.getLanguage("s0358")); return; } if (lastSelect != null) { lastSelect.selelct.gameObject.SetActive(false); } button.selelct.gameObject.SetActive(true); lastSelect = button; }
// 每一秒执行// 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 override void buttonEventBase(GameObject gameObj) { base.buttonEventBase(gameObj); if (gameObj == handSelectBtn) // 手动选号// { // 可买次数超了// if (LotteryManagement.Instance.getLotteryCount() <= 0) { UiManager.Instance.openDialogWindow <MessageLineWindow>((win) => { win.Initialize(LanguageConfigManager.Instance.getLanguage("Lottery_buyCountNotEough")); }); } else { UiManager.Instance.openDialogWindow <lotteryInputWindow>(); // if(LotteryManagement.Instance.enoughToBuy(UserManager.Instance.self.getVipLevel())) // { // UiManager.Instance.openDialogWindow<lotteryInputWindow>(); // } } } else if (gameObj == randomSelectBtn) // 随机选号// { // 可买次数超了// if (LotteryManagement.Instance.getLotteryCount() <= 0) { UiManager.Instance.openDialogWindow <MessageLineWindow>((win) => { win.Initialize(LanguageConfigManager.Instance.getLanguage("Lottery_buyCountNotEough")); }); } else { randomSelectNum(); // if(LotteryManagement.Instance.enoughToBuy(UserManager.Instance.self.getVipLevel())) // { // randomSelectNum(); // } } } else if (gameObj == shuoMingBtn) // 次数说明// { shuomingPanel.SetActive(true); MaskWindow.UnlockUI(); } else if (gameObj == selectBtn) // 选注// { if (LotteryManagement.Instance.selectNumList != null && LotteryManagement.Instance.selectNumList.Count > 0) { if (LotteryManagement.Instance.enoughToBuy(UserManager.Instance.self.getVipLevel())) { sendBuyMsg(LotteryManagement.Instance.selectNumList); } } else { UiManager.Instance.openDialogWindow <MessageLineWindow>((win) => { win.Initialize(LanguageConfigManager.Instance.getLanguage("Lottery_selectNumFirst")); }); } } else if (gameObj.name == "close" && gameObj != shuomingClose) { LotteryManagement.Instance.selectNumList.Clear(); LotteryInfoFPort fPort = FPortManager.Instance.getFPort("LotteryInfoFPort") as LotteryInfoFPort; fPort.lotteryInfoAccess(() => { LotteryManagement.Instance.canGetInitFPort = false; finishWindow(); UiManager.Instance.getWindow <NoticeWindow>().show.GetComponent <LotteryContent>().reSetMoneyTimeCount(); UiManager.Instance.getWindow <NoticeWindow>().show.GetComponent <LotteryContent>().initMainPanel(); UiManager.Instance.getWindow <NoticeWindow>().show.GetComponent <LotteryContent>().initRadioLabels(); UiManager.Instance.getWindow <NoticeWindow>().show.GetComponent <LotteryContent>().setTimer(); UiManager.Instance.getWindow <NoticeWindow>().show.GetComponent <LotteryContent>().setBoolTrue(); }); } else if (gameObj == shuomingClose) { shuomingPanel.SetActive(false); } }