| | |
| | | Register(typeof(HA318_tagMCFreeGoodsInfo), typeof(DTCA318_tagMCFreeGoodsInfo));
|
| | | Register(typeof(HAA12_tagMCFlashGiftbagInfo), typeof(DTCAA12_tagMCFlashGiftbagInfo));
|
| | | Register(typeof(HAA13_tagMCFlashGiftbagPlayerInfo), typeof(DTCAA13_tagMCFlashGiftbagPlayerInfo));
|
| | | Register(typeof(HAA17_tagMCFlashSaleInfo), typeof(DTCAA17_tagMCFlashSaleInfo));
|
| | | Register(typeof(HAA18_tagMCFlashSaleAppointmentInfo), typeof(DTCAA18_tagMCFlashSaleAppointmentInfo));
|
| | |
|
| | | #region 仙界盛典
|
| | | Register(typeof(HAC09_tagGCFairyCeremonyInfo), typeof(DTCAC09_tagGCFairyCeremonyInfo));
|
| | |
| | | using UnityEngine;
|
| | | using System.Collections;
|
| | |
|
| | | using Snxxz.UI;
|
| | | // AA 18 限时抢购活动玩家预约信息 #tagMCFlashSaleAppointmentInfo
|
| | |
|
| | |
|
| | |
|
| | | public class DTCAA18_tagMCFlashSaleAppointmentInfo : DtcBasic {
|
| | |
|
| | | FlashRushToBuyModel rushToBuyModel { get { return ModelCenter.Instance.GetModel<FlashRushToBuyModel>(); } }
|
| | | public override void Done(GameNetPackBasic vNetPack) {
|
| | |
|
| | | base.Done(vNetPack);
|
| | |
|
| | | HAA18_tagMCFlashSaleAppointmentInfo vNetData = vNetPack as HAA18_tagMCFlashSaleAppointmentInfo;
|
| | | rushToBuyModel.UpdateFlashSaleAppointmentInfo(vNetData);
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | |
| | | OnClickSendBtn();
|
| | | }
|
| | |
|
| | | //if(Input.GetKeyDown(KeyCode.J))
|
| | | //{
|
| | | // EquipWashModel washModel = ModelCenter.Instance.GetModel<EquipWashModel>();
|
| | | // LocalSave.SetBool(washModel.MasterGroup1ActiveKey, false);
|
| | | // washModel.SetMasterGroupActiveRecord(2,1, washModel.MasterGroup1ActiveKey);
|
| | | // WindowCenter.Instance.Open<WashMasterActiveWin>();
|
| | | //}
|
| | | if (Input.GetKeyDown(KeyCode.J))
|
| | | {
|
| | | if(ModelCenter.Instance.GetModel<FlashRushToBuyModel>().IsOpen)
|
| | | {
|
| | | if (!WindowCenter.Instance.IsOpen<FlashRushToBuyWin>())
|
| | | {
|
| | | WindowCenter.Instance.Open<FlashRushToBuyWin>();
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | //if (Input.GetKeyDown(KeyCode.O))
|
| | | //{
|
| | | // EquipWashModel washModel = ModelCenter.Instance.GetModel<EquipWashModel>();
|
| | | // LocalSave.SetInt(washModel.MasterGroup1RaiseKey, 2);
|
| | | // washModel.SetMasterGroupRaiseRecord(4, 1, washModel.MasterGroup1RaiseKey);
|
| | | // WindowCenter.Instance.Open<WashMasterActiveWin>();
|
| | | //}
|
| | | }
|
| | |
|
| | | private void CreateCmdCell()
|
| | |
| | |
|
| | | public void OnPlayerLoginOk()
|
| | | {
|
| | | UpdateRedpoint();
|
| | | //UpdateRedpoint();
|
| | | }
|
| | |
|
| | | public override void UnInit()
|
| | |
| | | {
|
| | | get
|
| | | {
|
| | | return OperationTimeHepler.Instance.SatisfyOpenCondition(Operation.FlashRushToBuy);
|
| | | var operation = GetOperationFlashRushToBuy();
|
| | | if(operation != null)
|
| | | {
|
| | | return operation.SatisfyOpenCondition();
|
| | | }
|
| | | return false;
|
| | | }
|
| | | }
|
| | |
|
| | |
| | |
|
| | | for (int i = 0; i < operation.flashShops.Count; i++)
|
| | | {
|
| | | int days = operation.totalDays;
|
| | | int days = operation.totalDays + 1;
|
| | | int dayIndex = i / (operation.flashShops.Count / days);
|
| | | int timeIndex = i % (operation.flashShops.Count / days);
|
| | | int seconds = 0;
|
| | |
| | | private void UpdateSelectSaleTime()
|
| | | {
|
| | | CreateSaleItem();
|
| | | saleTimeCtrl.m_Scorller.RefreshActiveCellViews();
|
| | | }
|
| | |
|
| | | private void CreateOperationTimes()
|
| | |
| | | timeIndex = -1;
|
| | | if (operation == null) return;
|
| | |
|
| | | int days = operation.totalDays;
|
| | | int days = operation.totalDays + 1;
|
| | | dayIndex = cell.index/(operation.flashShops.Count / days);
|
| | | timeIndex = cell.index % (operation.flashShops.Count / days);
|
| | | if(dayIndex == rushToBuyModel.presentFlashShop.dayIndex
|
| | |
| | |
|
| | | public void UpdateBuyState()
|
| | | {
|
| | | if (operation == null) return;
|
| | | if (operation == null || timeIndex == -1) return;
|
| | |
|
| | | int seconds = 0;
|
| | | OperationTime operationTime = operation.times[timeIndex];
|
| | |
| | | remainText.text = StringUtility.Contact("秒杀进行中", TimeUtility.SecondsToHMS(seconds));
|
| | | break;
|
| | | case 1:
|
| | | if(selectImg.activeInHierarchy)
|
| | | {
|
| | | rushToBuyModel.SetDefaultSelectSaleTime();
|
| | | }
|
| | | this.gameObject.SetActive(false);
|
| | | rushToBuyModel.UpdateSelectFlashSaleTime(dayIndex, timeIndex);
|
| | | break;
|
| | | }
|
| | | }
|
| | |
| | | if (shop.dayIndex == dayIndex
|
| | | && shop.timeIndex == timeIndex)
|
| | | {
|
| | | flashSaleShop = shop;
|
| | | return true;
|
| | | }
|
| | | }
|
| | |
| | | var endTime = new DateTime(startDate.year, startDate.month,day, operationTime.endHour, operationTime.endHour, 0);
|
| | | int advanceSec = Mathf.CeilToInt((float)(startTime - time).TotalSeconds);
|
| | | int endSec = Mathf.CeilToInt((float)(endTime - time).TotalSeconds);
|
| | | if (seconds > 0)
|
| | | if (advanceSec > 0)
|
| | | {
|
| | | seconds = advanceSec;
|
| | | return -1;
|
| | |
| | |
|
| | | public override bool SatisfyOpenCondition()
|
| | | {
|
| | | return PlayerDatas.Instance.baseData.LV >= limitLv;
|
| | | if(PlayerDatas.Instance.baseData.LV >= limitLv && InDay(TimeUtility.ServerNow))
|
| | | {
|
| | | return true;
|
| | | }
|
| | | return false;
|
| | | }
|
| | |
|
| | | public override void Reset()
|
| | |
| | | RegisterModel<FeatureNoticeModel>();
|
| | | RegisterModel<AwardExchangeModel>();
|
| | | RegisterModel<WheelOfFortuneModel>();
|
| | | RegisterModel<FlashRushToBuyModel>();
|
| | | inited = true;
|
| | | }
|
| | |
|