void RefreshTime() { countDownTime--; if (countDownTime < 0) { TimeManager.Instance.DeleteTrigger(trigger); if (isOver) { DataModel.IsChancelBtnTime = false; DataModel.IsOKBtnTime = false; return; } var e = new MessageBoxClick(btnId); EventDispatcher.Instance.DispatchEvent(e); var e1 = new Close_UI_Event(UIConfig.MessageBox); EventDispatcher.Instance.DispatchEvent(e1); DataModel.IsChancelBtnTime = false; DataModel.IsOKBtnTime = false; return; } DataModel.CountDown = string.Format("({0})", countDownTime.ToString() + "s"); }
private void OnOfflineExpCloses(IEvent ievent) { if (DataModel.Multi == 2) { //var cost = int.Parse(Table.GetClientConfig(589).Value); var cost = DataModel.Cost; if (cost > PlayerDataManager.Instance.GetRes((int)eResourcesType.DiamondRes)) { var ec = new Close_UI_Event(UIConfig.NewOfflineExpFrame); EventDispatcher.Instance.DispatchEvent(ec); var _ee = new ShowUIHintBoard(210102); EventDispatcher.Instance.DispatchEvent(_ee); var _e = new Show_UI_Event(UIConfig.RechargeFrame, new RechargeFrameArguments { Tab = 0 }); EventDispatcher.Instance.DispatchEvent(_e); return; } } NetManager.Instance.StartCoroutine(GetOfflineExp()); var e = new Close_UI_Event(UIConfig.NewOfflineExpFrame); EventDispatcher.Instance.DispatchEvent(e); }
public void OnBtnBackToCityFrame() { var e = new Close_UI_Event(UIConfig.TradingUI); EventDispatcher.Instance.DispatchEvent(e); //EventDispatcher.Instance.DispatchEvent(new Show_UI_Event(UIConfig.CityUI)); }
public void OnClose() { var e = new Close_UI_Event(UIConfig.RechargeFrame); EventDispatcher.Instance.DispatchEvent(e); EventDispatcher.Instance.DispatchEvent(new StoreUIRefreshEvent()); }
public void OnClickCloseBtn() { OnUIReset(); var e = new Close_UI_Event(UIConfig.RankUI, true); EventDispatcher.Instance.DispatchEvent(e); }
public void OnClickBtnClose() { // var dungeonTypesCount4 = DungeonList.Count; // for (int i = 0; i < dungeonTypesCount4; i++) // { // var toggle = DungeonList[i]; // if (i == 0) // { // toggle.value = true; // toggle.mIsActive = true; // if (toggle.activeSprite != null) // { // toggle.activeSprite.alpha = 1.0f; // } // } // else // { // toggle.value = false; // toggle.mIsActive = false; // if (toggle.activeSprite != null) // { // toggle.activeSprite.alpha = 0.0f; // } // } // } var e = new Close_UI_Event(UIConfig.DungeonUI); EventDispatcher.Instance.DispatchEvent(e); }
public IEnumerator RecycleItemCorotion() { using (var blockingLayer = new BlockingLayerHelper(0)) { var item = DataModel.ItemData; var msg = NetManager.Instance.RecycleBagItem(item.BagId, item.ItemId, item.Index, DataModel.RecycleCount); yield return(msg.SendAndWaitUntilDone()); if (msg.State == MessageState.Reply) { if (msg.ErrorCode == (int)ErrorCodes.OK) { //回收成功 var e1 = new ShowUIHintBoard(270110); EventDispatcher.Instance.DispatchEvent(e1); var e = new Close_UI_Event(UIConfig.ItemInfoUI); EventDispatcher.Instance.DispatchEvent(e); } else { UIManager.Instance.ShowNetError(msg.ErrorCode); } } else { Logger.Info(string.Format("SellItemCorotion....State = {0} ErroeCode = {1}", msg.State, msg.ErrorCode)); } } }
private IEnumerator OutPitCoroutine() { using (new BlockingLayerHelper(0)) { var _msg = NetManager.Instance.ExitDungeon(0); yield return(_msg.SendAndWaitUntilDone()); if (_msg.State == MessageState.Reply) { var _e = new Close_UI_Event(UIConfig.AreanaResult); EventDispatcher.Instance.DispatchEvent(_e); if (_msg.ErrorCode == (int)ErrorCodes.OK) { } else { Logger.Error(".....ExitDungeon.......{0}.", _msg.ErrorCode); } } else { Logger.Error(".....ExitDungeon.......{0}.", _msg.State); } } }
private void OnLineMemberConfirm(IEvent ievent) { var e = ievent as LineMemberConfirmEvent; var isRet = e.Type != 0; for (var i = 0; i < 5; i++) { var member = DataModel.SelfList[i]; if (member.ChararterId == e.CharacterId) { if (isRet) { member.IsConfirm = true; } else { member.IsConcel = true; } break; } member = DataModel.OtherList[i]; if (member.ChararterId == e.CharacterId) { if (isRet) { member.IsConfirm = true; } else { member.IsConcel = true; } break; } } if (isRet == false) { //有人取消后3秒钟关闭 var t = Game.Instance.ServerTime.AddSeconds(3); if (mCloseTrigger != null) { TimeManager.Instance.DeleteTrigger(mCloseTrigger); } mCloseTrigger = TimeManager.Instance.CreateTrigger(t, () => { TimeManager.Instance.DeleteTrigger(mCloseTrigger); var e1 = new Close_UI_Event(UIConfig.LineConfim); EventDispatcher.Instance.DispatchEvent(e1); mCloseTrigger = null; }); } else { CheckConfirmCount(); } }
//tab:附近队伍 public void OnClick_NearTeam() { var e2 = new Close_UI_Event(UIConfig.OperationList); EventDispatcher.Instance.DispatchEvent(e2); var e = new UIEvent_TeamFrame_NearTeam(); EventDispatcher.Instance.DispatchEvent(e); }
public void OnClickClose() { var e = new Close_UI_Event(UIConfig.StoreFarm); EventDispatcher.Instance.DispatchEvent(e); var e1 = new Show_UI_Event(UIConfig.FarmUI); EventDispatcher.Instance.DispatchEvent(e1); }
private void OnLineMembEnsureEvent(IEvent ievent) { var _e = ievent as LineMemberConfirmEvent; var _isRet = _e.Type != 0; for (var i = 0; i < 5; i++) { var _member = m_DataModel.SelfList[i]; if (_member.ChararterId == _e.CharacterId) { if (_isRet) { _member.IsConfirm = true; } else { _member.IsConcel = true; } break; } _member = m_DataModel.OtherList[i]; if (_member.ChararterId == _e.CharacterId) { if (_isRet) { _member.IsConfirm = true; } else { _member.IsConcel = true; } break; } } if (_isRet == false) { //有人取消后3秒钟关闭 var _t = Game.Instance.ServerTime.AddSeconds(3); if (m_closeTrigger != null) { TimeManager.Instance.DeleteTrigger(m_closeTrigger); } m_closeTrigger = TimeManager.Instance.CreateTrigger(_t, () => { TimeManager.Instance.DeleteTrigger(m_closeTrigger); var _e1 = new Close_UI_Event(UIConfig.LineConfim); EventDispatcher.Instance.DispatchEvent(_e1); m_closeTrigger = null; }); } else { CheckEnsureNum(); } }
public void OnClickShowElf() { var e = new Show_UI_Event(UIConfig.ElfUI); EventDispatcher.Instance.DispatchEvent(e); var e1 = new Close_UI_Event(UIConfig.ElfInfoUI); EventDispatcher.Instance.DispatchEvent(e1); }
private IEnumerator PlayRebornAnimation() { rebornAni.SetActive(true); yield return(new WaitForSeconds(2f)); rebornAni.SetActive(false); var e = new Close_UI_Event(UIConfig.RebornUi, true); EventDispatcher.Instance.DispatchEvent(e); }
public void OnBtnClose() { var e = new Close_UI_Event(UIConfig.ChatMainFrame); EventDispatcher.Instance.DispatchEvent(e); var e2 = new Close_UI_Event(UIConfig.OperationList); EventDispatcher.Instance.DispatchEvent(e2); }
public void OnClickBtnGoToTask() { var e = new Close_UI_Event(UIConfig.RebornUi, true); EventDispatcher.Instance.DispatchEvent(e); var e1 = new RebornOperateEvent(1); EventDispatcher.Instance.DispatchEvent(e1); }
public void OnClickCancelByX() { //this.gameObject.SetActive(false); //var e = new MessageBoxClick(0); //EventDispatcher.Instance.DispatchEvent(e); var e1 = new Close_UI_Event(UIConfig.MessageBox); EventDispatcher.Instance.DispatchEvent(e1); }
public void OnClickInput() { var e = new UIEvent_EquipCompare_Input(); EventDispatcher.Instance.DispatchEvent(e); var e1 = new Close_UI_Event(UIConfig.EquipComPareUI); EventDispatcher.Instance.DispatchEvent(e1); }
public IEnumerator OverEnumerator() { yield return(new WaitForSeconds(3.5f)); isEnable = false; gameObject.SetActive(false); var e = new Close_UI_Event(UIConfig.ForceUI); EventDispatcher.Instance.DispatchEvent(e); overCoroutine = null; }
public void OnEvent_Equip(IEvent ievent) { var e = ievent as ModelDisplay_Equip_Event; if (e != null) { var e1 = new Close_UI_Event(UIConfig.ModelDisplayFrame); EventDispatcher.Instance.DispatchEvent(e1); Equip(e.ItemId); } }
public void OnCloseClean() { if (CleanMask.IsStart && !CleanMask.IsFinish) { var e = new SatueOperateEvent(12); EventDispatcher.Instance.DispatchEvent(e); } var e1 = new Close_UI_Event(UIConfig.CleanDust); EventDispatcher.Instance.DispatchEvent(e1); OnResetClean(); }
private void VipLimitOperation() { var _ee = new Close_UI_Event(UIConfig.RechargeFrame); EventDispatcher.Instance.DispatchEvent(_ee); var _e = new Show_UI_Event(UIConfig.RechargeFrame, new RechargeFrameArguments { Tab = 0 }); EventDispatcher.Instance.DispatchEvent(_e); }
public void OnClickOK() { //this.gameObject.SetActive(false); var e = new MessageBoxClick(1); EventDispatcher.Instance.DispatchEvent(e); if (!PlayerDataManager.Instance.NoticeData.DugeonNotMessage) { var e1 = new Close_UI_Event(UIConfig.MessageBox); EventDispatcher.Instance.DispatchEvent(e1); } }
public void OnClosePuzzel() { if (PuzzleMove.IsStart && !PuzzleMove.IsFinish) { var e = new SatueOperateEvent(2); EventDispatcher.Instance.DispatchEvent(e); } var e1 = new Close_UI_Event(UIConfig.PuzzleImage); EventDispatcher.Instance.DispatchEvent(e1); OnResetPuzzel(); }
public void OnItemClick() { var itemData = ItemLogic.Item as SceneNpcDataModel; var e = new MapSceneClickCell(itemData); EventDispatcher.Instance.DispatchEvent(e); var e1 = new Close_UI_Event(UIConfig.SceneMapUI); EventDispatcher.Instance.DispatchEvent(e1); }
public void OnClickCleanClose() { //设置结束 if (CleanMask.IsStart) { CleanPlay.TargetTime = Game.Instance.ServerTime; } else { var e1 = new Close_UI_Event(UIConfig.CleanDust); EventDispatcher.Instance.DispatchEvent(e1); } }
public void OnClickPuzzelClose() { //设置结束 if (PuzzleMove.IsStart) { PuzzlePlay.TargetTime = Game.Instance.ServerTime; } else { var e1 = new Close_UI_Event(UIConfig.PuzzleImage); EventDispatcher.Instance.DispatchEvent(e1); } }
public void OnClickShowElf() { if (!GuideTrigger.IsFunctionOpen("BtnElf")) { GameUtils.ShowHintTip(1726); return; } var e = new Show_UI_Event(UIConfig.ElfUI); EventDispatcher.Instance.DispatchEvent(e); var e1 = new Close_UI_Event(UIConfig.ElfInfoUI); EventDispatcher.Instance.DispatchEvent(e1); }
private void OnClosed(IEvent ievent) { if (this.State == FrameState.Open) { Close_UI_Event e = ievent as Close_UI_Event; if (e.config.Equals(UIConfig.ItemInfoUI)) { var controller = UIManager.Instance.GetController(UIConfig.ItemInfoUI); controller.RefreshData(m_IIA); m_ItemInfoDataModel = (controller.GetDataModel("") as ItemInfoDataModel).GetValue(); } } }
public void OnClickCancel() { if (BoxType == 2) { return; } //this.gameObject.SetActive(false); var e = new MessageBoxClick(0); EventDispatcher.Instance.DispatchEvent(e); var e1 = new Close_UI_Event(UIConfig.MessageBox); EventDispatcher.Instance.DispatchEvent(e1); }