コード例 #1
0
        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");
        }
コード例 #2
0
        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);
        }
コード例 #3
0
ファイル: TradingFrame.cs プロジェクト: pikaqiufk/Client
        public void OnBtnBackToCityFrame()
        {
            var e = new Close_UI_Event(UIConfig.TradingUI);

            EventDispatcher.Instance.DispatchEvent(e);
            //EventDispatcher.Instance.DispatchEvent(new Show_UI_Event(UIConfig.CityUI));
        }
コード例 #4
0
ファイル: PayFrame.cs プロジェクト: tuita520/u3dmmorpg
        public void OnClose()
        {
            var e = new Close_UI_Event(UIConfig.RechargeFrame);

            EventDispatcher.Instance.DispatchEvent(e);
            EventDispatcher.Instance.DispatchEvent(new StoreUIRefreshEvent());
        }
コード例 #5
0
        public void OnClickCloseBtn()
        {
            OnUIReset();
            var e = new Close_UI_Event(UIConfig.RankUI, true);

            EventDispatcher.Instance.DispatchEvent(e);
        }
コード例 #6
0
        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);
        }
コード例 #7
0
    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));
            }
        }
    }
コード例 #8
0
        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);
                }
            }
        }
コード例 #9
0
    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();
        }
    }
コード例 #10
0
ファイル: TeamFrameFrame.cs プロジェクト: tuita520/u3dmmorpg
        //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);
        }
コード例 #11
0
        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);
        }
コード例 #12
0
        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();
            }
        }
コード例 #13
0
ファイル: AnimalInfo.cs プロジェクト: pikaqiufk/Client
        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);
        }
コード例 #14
0
        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);
        }
コード例 #15
0
ファイル: ChatMainLogic.cs プロジェクト: tuita520/u3dmmorpg
    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);
    }
コード例 #16
0
        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);
        }
コード例 #17
0
        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);
        }
コード例 #18
0
        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);
        }
コード例 #19
0
        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;
        }
コード例 #20
0
    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);
        }
    }
コード例 #21
0
        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();
        }
コード例 #22
0
ファイル: StoreController.cs プロジェクト: tuita520/u3dmmorpg
        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);
        }
コード例 #23
0
ファイル: DialogBoxFrame.cs プロジェクト: tuita520/u3dmmorpg
        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);
            }
        }
コード例 #24
0
        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();
        }
コード例 #25
0
        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);
        }
コード例 #26
0
 public void OnClickCleanClose()
 {
     //设置结束
     if (CleanMask.IsStart)
     {
         CleanPlay.TargetTime = Game.Instance.ServerTime;
     }
     else
     {
         var e1 = new Close_UI_Event(UIConfig.CleanDust);
         EventDispatcher.Instance.DispatchEvent(e1);
     }
 }
コード例 #27
0
 public void OnClickPuzzelClose()
 {
     //设置结束
     if (PuzzleMove.IsStart)
     {
         PuzzlePlay.TargetTime = Game.Instance.ServerTime;
     }
     else
     {
         var e1 = new Close_UI_Event(UIConfig.PuzzleImage);
         EventDispatcher.Instance.DispatchEvent(e1);
     }
 }
コード例 #28
0
        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);
        }
コード例 #29
0
        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();
                }
            }
        }
コード例 #30
0
        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);
        }