//更新所有加载项目的时间 public void updateTime() { if (sample.type == NoticeType.EXCHANGENOTICE || sample.type == NoticeType.NEW_EXCHANGE) { for (int i = 0; i < nodeList.Count; i++) { if (nodeList [i] == null) { continue; } NoticeActivityExchangeBarCtrl button = nodeList [i].GetComponent <NoticeActivityExchangeBarCtrl> (); button.showTime(); } } else if (sample.type == NoticeType.TOPUPNOTICE || sample.type == NoticeType.COSTNOTICE || sample.type == NoticeType.TIME_RECHARGE || sample.type == NoticeType.NEW_RECHARGE || sample.type == NoticeType.NEW_CONSUME) { for (int i = 0; i < nodeList.Count; i++) { if (nodeList [i] == null) { continue; } NoticeActivityRechargeBarCtrl button = nodeList [i].GetComponent <NoticeActivityRechargeBarCtrl> (); button.showTime(); } } else if (sample.type == NoticeType.CONSUME_REBATE) { //消费返利条目暂时没有时间限制 } }
public override void initButton(int i) { if (sample.type == NoticeType.EXCHANGENOTICE || sample.type == NoticeType.NEW_EXCHANGE) { if (nodeList [i] == null) { nodeList [i] = NGUITools.AddChild(gameObject, (activityBase as NoticeActivityExchangeContent).NoticeActivityExchangePrefab); } nodeList [i].name = StringKit.intToFixString(i + 1); NoticeActivityExchangeBarCtrl ctrl = nodeList [i].GetComponent <NoticeActivityExchangeBarCtrl> (); ctrl.fatherWindow = activityBase as NoticeActivityExchangeContent; ctrl.updateItem(exchangeList [i]); } else if (sample.type == NoticeType.TOPUPNOTICE || sample.type == NoticeType.COSTNOTICE || sample.type == NoticeType.TIME_RECHARGE || sample.type == NoticeType.NEW_RECHARGE || sample.type == NoticeType.NEW_CONSUME) { if (nodeList [i] == null) { nodeList [i] = NGUITools.AddChild(gameObject, (activityBase as NoticeActivityRechargeContent).NoticeActivityRechargePrefab); } nodeList [i].name = StringKit.intToFixString(i + 1); NoticeActivityRechargeBarCtrl ctrl = nodeList [i].GetComponent <NoticeActivityRechargeBarCtrl> (); ctrl.fatherWindow = activityBase as NoticeActivityRechargeContent; ctrl.updateItem(rechargeList [i], sample, notice); } else if (sample.type == NoticeType.CONSUME_REBATE) { if (nodeList [i] == null) { nodeList [i] = NGUITools.AddChild(gameObject, (activityBase as NoticeConsumeRebateContent).noticeActivityShopPrefab); } nodeList [i].name = StringKit.intToFixString(i + 1); NoticeActivityShopBarCtrl ctrl = nodeList [i].GetComponent <NoticeActivityShopBarCtrl> (); ctrl.fatherContent = activityBase as NoticeConsumeRebateContent; ctrl.updateItem(consumeRebateList [i], sample); } else if (sample.type == NoticeType.ONE_MANY_RECHARGE) { if (nodeList[i] == null) { nodeList[i] = NGUITools.AddChild(gameObject, (activityBase as NoticeOneManyRechargeContent).NoticeOneManyRechargePrefab); } nodeList[i].name = StringKit.intToFixString(i + 1); NoticeOneManyRechargeItem ctrl = nodeList[i].GetComponent <NoticeOneManyRechargeItem>(); ctrl.fatherWindow = activityBase as NoticeOneManyRechargeContent; ctrl.updateItem(rechargeList[i], sample, notice); } }
public override void DoClickEvent() { base.DoClickEvent(); if (fatherBar.GetType() == typeof(ExchangeBarCtrl)) { UiManager.Instance.openDialogWindow <ConditionsWindow>((win) => { ExchangeBarCtrl bar = fatherBar as ExchangeBarCtrl; win.Initialize(ExchangeSampleManager.Instance.getExchangeSampleBySid(bar.exchange.sid)); }); } if (fatherBar.GetType() == typeof(NoticeActivityExchangeBarCtrl)) { UiManager.Instance.openDialogWindow <ConditionsWindow>((win) => { NoticeActivityExchangeBarCtrl bar = fatherBar as NoticeActivityExchangeBarCtrl; win.Initialize(ExchangeSampleManager.Instance.getExchangeSampleBySid(bar.exchange.sid)); }); } }
public override void updateItem(GameObject item, int index) { if (sample.type == NoticeType.EXCHANGENOTICE || sample.type == NoticeType.NEW_EXCHANGE) { NoticeActivityExchangeBarCtrl ctrl = item.GetComponent <NoticeActivityExchangeBarCtrl> (); ctrl.updateItem(exchangeList [index]); } else if (sample.type == NoticeType.TOPUPNOTICE || sample.type == NoticeType.COSTNOTICE || sample.type == NoticeType.TIME_RECHARGE || sample.type == NoticeType.NEW_RECHARGE || sample.type == NoticeType.NEW_CONSUME) { NoticeActivityRechargeBarCtrl ctrl = item.GetComponent <NoticeActivityRechargeBarCtrl> (); ctrl.updateItem(rechargeList [index], sample, notice); } else if (sample.type == NoticeType.CONSUME_REBATE) { NoticeActivityShopBarCtrl ctrl = item.GetComponent <NoticeActivityShopBarCtrl> (); ctrl.updateItem(consumeRebateList [index], sample); } else if (sample.type == NoticeType.ONE_MANY_RECHARGE) { NoticeOneManyRechargeItem itemCtrl = item.GetComponent <NoticeOneManyRechargeItem>(); itemCtrl.updateItem(rechargeList[index], sample, notice); } }