示例#1
0
 public static void SendEvent(EventTypeDefine p_event, object p_param = null)
 {
     if (onEvent != null)
     {
         Core.Data.guideManger.CanClickGuideUI = false;
         onEvent(p_event, p_param);
     }
 }
    protected override void OnEvent(EventTypeDefine p_e, object p_param)
    {
        ConsoleEx.DebugLog("EventType = " + p_e.ToString(), ConsoleEx.YELLOW);
        BanBattleManager battleMgr = BanBattleManager.Instance;
        BanSideInfo      attside   = battleMgr != null ? battleMgr.attackSideInfo : null;
        GuideManager     guideMgr  = Core.Data.guideManger;

#if NewGuide
        NewUIGuide guideUI = NewUIGuide.Instance;
#else
        UIGuide guideUI = UIGuide.Instance;
#endif
        TemporyData temp = Core.Data.temper;

        switch (p_e)
        {
        //打开第一个宝箱
        case EventTypeDefine.OpenTreasureChest:
            if (Open != null)
            {
                GuideData data = p_param as GuideData;
                if (data != null)
                {
                    Open(data.MultiIndex);
                    Core.Data.guideManger.DelayAutoRun(1.5f);
                }
            }
            break;

        //退出战斗
        case EventTypeDefine.ExitFightingScene:
            if (Exit != null)
            {
                AsyncTask.QueueOnMainThread(
                    () => {
                    Exit();
                    #region Add by jc 如果没有升级并且已经是最后一步引导了
                    if (Core.Data.playerManager.Lv <= temp.mPreLevel && temp.mPreLevel > 0 && !guideMgr.isLastOfCurGuide)
                    {
                        guideUI.HideGuide();
                        Core.Data.guideManger.DelayAutoRun(2.5f);
                    }
                    #endregion
                }
                    , 0.5f
                    );
            }
            break;

        case EventTypeDefine.Click_XiaoWuKongVBiKe:                       //显示双方队伍
        case EventTypeDefine.Click_WuKong2_Anger:                         //孙悟空2继承小悟空20怒气
        case EventTypeDefine.Click_BILUSI_V_WuKong3:                      //比鲁斯
        case EventTypeDefine.Click_WuKong3_NO_ANGER:                      //没有怒气值不能释放主动技能
        case EventTypeDefine.Click_WuKong3_Vs_BiLu:                       //孙悟空3对决比鲁斯
            guideUI.HideGuide();
            Time.timeScale = 1.0f;
            break;

            #region 怒气技的起始阶段
        case EventTypeDefine.Click_XiaoWuKong_OS_4: {
            Time.timeScale = 1.0f;
            SkillData sd = Core.Data.skillManager.getSkillDataConfig(25037);
            attside.PlayerAngryWord.FeatureWarShow(1, sd.name, () => { Time.timeScale = 0f; });
        }
        break;

        case EventTypeDefine.Click_WuKong2_OS_4: {
            Time.timeScale = 1.0f;
            SkillData sd = Core.Data.skillManager.getSkillDataConfig(25008);
            attside.PlayerAngryWord.FeatureWarShow(1, sd.name, () => { Time.timeScale = 0f; });
        }
        break;

        case EventTypeDefine.Click_WuKong3_OS_4: {
            Time.timeScale = 1.0f;
            SkillData sd = Core.Data.skillManager.getSkillDataConfig(25058);
            attside.PlayerAngryWord.FeatureWarShow(1, sd.name, () => { Time.timeScale = 0f; });
        }
        break;
            #endregion

        case EventTypeDefine.Click_XiaoWuKong_OS_4_2:
            Time.timeScale = 1.0f;
            attside.PlayerAngryWord.FeatureWarShow(2, string.Empty, () => { Time.timeScale = 0f; });
            break;

        case EventTypeDefine.Click_XiaoWuKong_OS_4_3:
            Time.timeScale = 1.0f;
            attside.PlayerAngryWord.FeatureWarShow(3, string.Empty, () => { Time.timeScale = 0f; });
            break;

        case EventTypeDefine.Click_XiaoWuKong_OS_4_4:
            Time.timeScale = 1.0f;
            guideUI.HideGuide();
            AsyncTask.RemoveAllDelayedWork();
            attside.PlayerAngryWord.FeatureWarShow(4, string.Empty, () => { battleMgr.AngryUI(false, null, -1); });

            long      now  = Core.TimerEng.curTime;
            TimerTask task = new TimerTask(now, now + 2, 1, ThreadType.MainThread);
            task.onEventEnd = (t) => {
                Time.timeScale = 1.0f;
                AsyncTask.RemoveAllDelayedWork();
                battleMgr.AngryUI(false, null, -1);
            };
            task.DispatchToRealHandler();
            break;

        case EventTypeDefine.Click_XiaoWuKong_Lv1: {
            Time.timeScale = 1.0f;
            guideUI.HideGuide();
            AsyncTask.RemoveAllDelayedWork();

            attside.PlayerAngryWord.FeatureWarShow(1, string.Empty, () => { battleMgr.AngryUI(false, null, -1); });
            attside.angrySlot.curAP = 0;
            battleMgr.Root.Camera1.eventReceiverMask = LayerMask.NameToLayer("Everything");
        }
        break;

        //调用武者强化
        case EventTypeDefine.Click_JumpToStrengthening:
            if (Exit != null)
            {
                UIGuide.Instance.HideGuide();

                Core.Data.guideManger.DelayAutoRun(2f);
                // --- 武者强化 ---
                FinalTrialMgr.GetInstance().jumpTo = TrialEnum.None;
                BattleToUIInfo.From = RUIType.EMViewState.S_Team_NoSelect;
                Exit();
            }

            break;
        }
    }
示例#3
0
    protected override void OnEvent(EventTypeDefine p_e, object p_param)
    {
        switch (p_e)
        {
        case EventTypeDefine.Click_DuoBaoButton:
            FinalTrialMgr.GetInstance().m_NowTaskId  = Core.Data.guideManger.LastTaskID;
            FinalTrialMgr.GetInstance().m_LastTaskId = Core.Data.guideManger.LastTaskID;
            DBUIController.mDBUIInstance.SetViewState(EMViewState.S_QiangDuo);
            break;

        case EventTypeDefine.Click_MartialConference:

            FinalTrialMgr.GetInstance().m_NowTaskId = Core.Data.guideManger.LastTaskID;
            FinalTrialMgr.GetInstance().CreateScript(TrialEnum.TrialType_TianXiaDiYi, QiangduoEnum.QiangduoEnum_List);
            break;

        case EventTypeDefine.Click_Exchange_DuoBao:
            FinalTrialMgr.GetInstance().RequestByQiangduoType(QiangduoEnum.QiangduoEnum_Duihuan);
            //			FinalTrialMgr.GetInstance().qiangDuoPanelScript.MoveToTarget();
            break;

        case EventTypeDefine.Click_GetChaoShenShui:
            Core.Data.DuiHuanManager.buyZhanGongItem(1, 0);
            break;

        case EventTypeDefine.Click_BackToDuoBao:
            FinalTrialMgr.GetInstance().m_QiangduoEnum = QiangduoEnum.QiangduoEnum_Duihuan;
            FinalTrialMgr.GetInstance().qiangDuoPanelScript.OnBtnClose();
            break;

        case EventTypeDefine.Click_DuoBaoBackToMain:
            DBUIController.mDBUIInstance.mDuoBaoView.OnBtnQuit();
            break;

        case EventTypeDefine.Click_SevenRewardButton:
            UISevenDayRewardMain.OpenUI();
            break;

        case EventTypeDefine.Click_GetSevenReward:
            UISevenDayRewardMain.GetInstance().mReward.mCellList[0].SendMsg();
            Core.Data.guideManger.HideGuide();
            break;

        case EventTypeDefine.Click_CloseSevenReward:
            UISevenDayRewardMain.GetInstance().Back_OnClick();
            break;

        case EventTypeDefine.Click_RunTiaoZhanBtn:
            FinalTrialMgr.GetInstance().currentFightOpponentInfo = FinalTrialMgr.GetInstance().qiangDuoPanelScript.ListCell[0].fightOpponentInfo;
            Core.Data.temper._PvpEnemyName = FinalTrialMgr.GetInstance().qiangDuoPanelScript.ListCell[0].fightOpponentInfo.n;
            FinalTrialMgr.GetInstance().tianXiaDiYiFightRequest(FinalTrialMgr.GetInstance().qiangDuoPanelScript.ListCell[0].fightOpponentInfo.g,
                                                                FinalTrialMgr.GetInstance().qiangDuoPanelScript.ListCell[0].fightOpponentInfo.r, EMViewState.S_QiangDuo, Core.Data.temper.gambleTypeId);
            Core.Data.guideManger.HideGuide();
            break;

        case EventTypeDefine.Click_Shop:
            UIDragonMallMgr.GetInstance().OpenUI(ShopItemType.HotSale);
            break;

        case EventTypeDefine.Click_BuyFiveStarEgg:
            List <ItemData> mitems = Core.Data.itemManager.GetShopItem(ShopItemType.HotSale);
            ItemData        _data  = null;
            foreach (ItemData data in mitems)
            {
                if (data.ID == 110025)
                {
                    _data = data;
                    break;
                }
            }
            SecretShopMgr.GetInstance().SetSecretShopTag(true, _data, ShopItemType.HotSale, 2);
            break;

        case EventTypeDefine.Click_SureBuyFiveStarEgg:
            SecretShopMgr.GetInstance()._UISecretShopTag.Buy_OnClick();
            Core.Data.guideManger.HideGuide();
            break;

        case EventTypeDefine.Click_ExitShop:
            DBUIController.mDBUIInstance.mUIDragonMallMain.Back_OnClick();
            break;

        case EventTypeDefine.UnLock_God_And_SecondPos:
            //Core.Data.guideManger.AutoRUN();
            break;

        default:
            break;
        }
    }
示例#4
0
    protected override void OnEvent(EventTypeDefine p_e, object p_param)
    {
        switch (p_e)
        {
        case EventTypeDefine.Click_Activity:
            DBUIController.mDBUIInstance.OnBtnMainViewID(SQYMainController.CLICK_HuoDong);
            //          UIWXLActivityMainController.Instance.MoveToTarget();
            break;

        case EventTypeDefine.Click_ActivityGiftBag:
            ActivityNetController.GetInstance().GotLevelGiftRequest(Core.Data.playerManager.Lv);
            Core.Data.guideManger.HideGuide();
            break;

        case EventTypeDefine.Click_GetActivityGiftBag:
            //5级奖励包
//            ActivityNetController.GetInstance ().GotLevelGiftRequest (Core.Data.playerManager.Lv);
//            UIGuide.Instance.HideGuide();
            // LevelRewardCollection.OnClickGiftOnGuide ();
            break;

        case EventTypeDefine.Click_HideUIGuide:
            Core.Data.guideManger.HideGuide();
            break;

        case EventTypeDefine.Click_ExitLevelFiveReward:
            UILevelRewardController.Instance.OnBtnBack();
            break;

        case EventTypeDefine.Click_SigninButton:
            UIWXLActivityMainController.Instance.OnQiandao();
            break;

        case EventTypeDefine.Click_GetSigninRewardButton:
            if (UIDateSignController.Instance.ItemList != null)
            {
                int TN = NoticeManager.signtms;
                UIDateSignController.Instance.ItemList [TN].OnClickSignToday();
            }
            Core.Data.guideManger.HideGuide();
            break;

        case EventTypeDefine.Click_CloseSignin:
            UIDateSignController.Instance.OnBackBtn();
            break;

        case EventTypeDefine.Click_DayRewardButton:
            WXLAcitvityFactory.CreatActivity(ActivityItemType.DailyGiftPanel, (object)DBUIController.mDBUIInstance._TopRoot, null);
            break;

        case EventTypeDefine.Click_SevenRewardUI:
            //    ActivityNetController.GetInstance ().GetSevenDayReward ();
            Core.Data.guideManger.HideGuide();
            break;

        case EventTypeDefine.Click_CloseDayRewardPanel:
            DailyGiftController.Instance.OnClickBack();
            break;

        case EventTypeDefine.Sliding_Texture:
            Core.Data.guideManger.HideGuide();
            PVEDownloadCartoonController.Instance.RunToBottom();
            break;

        case EventTypeDefine.Click_CloseTexture:
            PVEDownloadCartoonController.Instance.CloseCartoonPanel();
            break;
        }
    }
示例#5
0
 protected abstract void OnEvent(EventTypeDefine p_e, object p_param);
示例#6
0
    protected override void OnEvent(EventTypeDefine p_e, object p_param)
    {
        GuideData data = p_param as GuideData;

        switch (p_e)
        {
        //点击副本
        case EventTypeDefine.Click_FB:
            DBUIController.mDBUIInstance.OnBtnMainViewID(SQYMainController.CLICK_FuBen);
            break;

        //*选择第一大章
        case EventTypeDefine.Click_FirstChapter:
            foreach (Chapter c in Core.Data.dungeonsManager.ChapterList.Values)
            {
                DBUIController.mDBUIInstance.SetViewStateWithData(RUIType.EMViewState.S_CityFloor, c);
                UIMiniPlayerController.Instance.SetActive(false);
                break;
            }
            break;

        //点击执行
        case EventTypeDefine.Click_RunButton:
            CityFloorData.Instance.ClickFloorItem(Core.Data.dungeonsManager.FloorList[CityFloorData.Instance.currCity.toFightFloorId], true);
            break;

        //点击收取
        case EventTypeDefine.Click_ReceiveButton:
            GameObject.Find("pbUIFloorReward(Clone)").GetComponent <UIFloorReward>().OnColse();
            City CurFightCity = CityFloorData.Instance.currCity;            //Core.Data.dungeonsManager.CityList[Core.Data.dungeonsManager.fightCityId];
            //60105
            CurFightCity.toFightFloorId = CurFightCity.config.floorID[CurFightCity.config.floorID.Length - 1];
            //60104
            Core.Data.dungeonsManager.lastFloorId = CurFightCity.toFightFloorId - 1;
            //直接通过当前City的所有小关
            foreach (int floorid in CurFightCity.config.floorID)
            {
                Floor floor = Core.Data.dungeonsManager.FloorList[floorid];
                if (!floor.isBoss)
                {
                    floor.curProgress = floor.config.wave;
                }
            }

            CityFloorData.Instance.SelectCity(CurFightCity);
            CityFloorData.Instance.UpdateFloorItemsState();
            break;

        //跳转BOSS战
        case EventTypeDefine.Click_GoToBossFight:
            break;

        //点击执行,进入BOSS战
        case EventTypeDefine.Click_RunBossFight:
            CityFloorData.Instance.ClickFloorItem(Core.Data.dungeonsManager.FloorList[CityFloorData.Instance.currCity.toFightFloorId], true);
            Core.Data.guideManger.HideGuide();
            break;

        //播放战斗
        case EventTypeDefine.Play_FightAnimation:
            Core.Data.guideManger.HideGuide();
            Time.timeScale = 1;
            break;

        //点击返回,<一键>从副本返回游戏主界面
        case EventTypeDefine.Exit_FBtoMainScene:
            if (UICityFloorManager.Instance != null)
            {
                UICityFloorManager.Instance.ClickBack();
            }
            if (SQYChapterController.Instance != null)
            {
                SQYChapterController.Instance.OnBtnBack();
            }
            break;

        //点击返回,从副本主界面返回主界面
        case EventTypeDefine.Exit_MainFB:
            if (JCPVEMainController.Instance != null)
            {
                JCPVEMainController.Instance.OnBtnClick("BackButton");
            }
            break;

        //点击返回,从副本主界面返回主界面,并重置3D场景位置
        case EventTypeDefine.Click_TeamToMainUI2:
            if (JCPVEMainController.Instance != null)
            {
                JCPVEMainController.Instance.OnBtnClick("BackButton");
            }
            Core.Data.guideManger.SetMainSceensDefaultPostion();
            break;

        //点击任意地方后,强制返回主界面
        case EventTypeDefine.Click_AnyWhereToMainScene:
            UICityFloorManager.Instance.ClickBack();
            SQYChapterController.Instance.OnBtnBack();
            break;

        //点击神龙
        case EventTypeDefine.Click_ShenLong:
            FinalTrialMgr.GetInstance().m_NowTaskId = Core.Data.guideManger.LastTaskID;
            DBUIController.mDBUIInstance.OnBtnMainViewID(SQYMainController.CLICK_ShenLong);
            break;

        //点击6号龙珠
        case EventTypeDefine.Click_SixStarBall:
            //Debug.Log(UIShenLongManager.Instance.GetDragonBallButton(5).name);
            UIShenLongManager.Instance.GetDragonBallButton(5).qiangDuoDragonBall();
            break;

        //固定只推送一个机器人,点击抢夺按钮
        case EventTypeDefine.Click_RobSixStarBall:
            if (QiangDuoPanelScript.Instance.ListCell.Count > 0)
            {
                QiangDuoPanelScript.Instance.ListCell[0].onFight();
            }
            Core.Data.guideManger.HideGuide();
            break;

        //返回龙珠主界面
        case EventTypeDefine.Click_BackToShengLongMain:
            QiangDuoPanelScript.Instance.OnBtnClose();
            break;

        //点击神龙合成按钮
        case EventTypeDefine.Click_CallOfDragon:
            UIShenLongManager.Instance.clickCallDragon();
            break;

        //选择奥义
        case EventTypeDefine.Click_ChooseAoYi:
            UIShenLongManager.Instance.ClickYaoYi1();
            break;

        //召唤神龙以后点击确定
        case EventTypeDefine.Click_YesAtDragonUI:
            UIShenLongManager.Instance.BtnSelectedAoYiOk();
            break;

        //和占卜婆婆说话<跳转打弗利萨>
        case EventTypeDefine.Click_FightWithFulisa:
            Core.Data.guideManger.HideGuide();

            Object     obj = PrefabLoader.loadFromUnPack("Ban/FeatureWar", false);
            GameObject go  = GameObject.Instantiate(obj) as GameObject;
            RED.AddChild(go, DBUIController.mDBUIInstance._bottomRoot);

            AsyncTask.QueueOnMainThread(() => { SendBattleRequest(); }, 1F);

            break;

        //点击穿戴奥义
        case EventTypeDefine.Click_EquipAoYi:
            UIDragonAltar d = UIShenLongManager.Instance.dragonAltar;
            if (d != null && d.aoYiSlotList.Count > 0)
            {
                d.aoYiSlotList[0].OnClicked();
            }
            break;

        //选择第一个奥义
        case EventTypeDefine.Click_SelectedFirstAoYi:
            if (UIShenLongManager.Instance.dragonAltar != null && UIShenLongManager.Instance.dragonAltar.selectAoYiAlert != null && UIShenLongManager.Instance.dragonAltar.selectAoYiAlert.List_AoYiSlots.Count > 0)
            {
                UIShenLongManager.Instance.dragonAltar.selectAoYiAlert.List_AoYiSlots[0].OnClicked();
            }
            break;

        //点击确定穿戴这个奥义
        case EventTypeDefine.Click_SureEquipAoYi:
            if (UIShenLongManager.Instance.dragonAltar != null && UIShenLongManager.Instance.dragonAltar.selectAoYiAlert != null)
            {
                UIShenLongManager.Instance.dragonAltar.selectAoYiAlert.OnSelectAoYi();
            }
            break;

        //关闭组合技能显示板
        case EventTypeDefine.Click_CloseCombinationSkillPanel:
            if (CombinationSkillPanelScript.Instance != null)
            {
                CombinationSkillPanelScript.Instance.DestroyPanel();
            }
            break;

        //获得一个1级红宝石
        case EventTypeDefine.Add_GetLv1RedGem:
        {
            ItemOfReward[] item = new ItemOfReward[] { new ItemOfReward() };
            item[0].num  = 1;
            item[0].ppid = -21;
            item[0].pid  = 120201;
            Core.Data.itemManager.AddRewardToBag(item[0]);
            GetRewardSucUI.OpenUI(item, Core.Data.stringManager.getString(5047));
        }
        break;

        //点击返回,返回主界面(并设置主界面位置)
        case EventTypeDefine.Click_BackTo3DMain:
            TeamUI.mInstance.m_teamView.OnBtnBack();
            Core.Data.guideManger.SetMainSceensDefaultPostion();
            break;

        //打开装备锻造屋
        case EventTypeDefine.Click_OpenFrogingSystem:
            FrogingSystem.ForgingRoomUI.OpenUI();
            DBUIController.mDBUIInstance.HiddenFor3D_UI();
            break;

        //打开宝石合成界面
        case EventTypeDefine.Click_OpenGemMosaic:
            FrogingSystem.ForgingRoomUI.Instance.GoTo(FrogingSystem.ForgingPage.Forging_Mosaic);
            break;

        //点击添加按钮
        case EventTypeDefine.Click_AddEquipment:
            FrogingSystem.ForgingRoomUI.Instance.InlaySystem.ButtonClick("Equipment");
            break;

        case EventTypeDefine.Click_LeftGemSlot:
            FrogingSystem.ForgingRoomUI.Instance.InlaySystem.ButtonClick("Btn_Hole5");
            break;

        //任务弱引导(点击了主线任务按钮)
        case EventTypeDefine.Click_MainLineTask:
            UITask.Instance.OnBtnClick("Btn_MainLine");
            break;

        //任务弱引导(点击了Go按钮)
        case EventTypeDefine.Click_TaskGoBtn:
            UITask.Instance.OnBtnClick("Btn_Jump");
            break;

        //显示太阳和布尔玛
        case EventTypeDefine.Click_ShowSunAndBuErMa:
            if (DBUIController.mDBUIInstance != null)
            {
                DBUIController.mDBUIInstance.ShowFor2D_UI();
                DBUIController.mDBUIInstance.StartCoroutine("CheckSunState");
            }
            break;

        case EventTypeDefine.Add_GetJinGuBang:
        {
            //NGUIDebug.Log("Add_GetJinGuBang");
            if (Core.Data.itemManager.GetBagItem(-21) == null)
            {
                ItemOfReward[] item = new ItemOfReward[] { new ItemOfReward() };
                item[0].num  = 1;
                item[0].ppid = -21;
                item[0].lv   = 1;
                item[0].pid  = 40110;
                Core.Data.itemManager.AddRewardToBag(item[0]);
                GetRewardSucUI.OpenUI(item, Core.Data.stringManager.getString(5047));
            }
        }
        break;

        case EventTypeDefine.Click_JuQingFB:
            if (JCPVEMainController.Instance != null)
            {
                JCPVEMainController.Instance.OnBtnClick("PVEType_Plot");
            }
            break;

        case EventTypeDefine.Click_FirstGuanKa:
        {
            Core.Data.guideManger.HideGuide();
            Core.Data.usrManager.UserConfig.cartoon = 1;
            if (JCPVEPlotController.Instance != null)
            {
                Core.Data.guideManger.HideGuide();
                JCPVEPlotController.Instance.OnBuildingClick("60101");
            }
        }
        break;

        case EventTypeDefine.Click_FightDesButton:
            if (JCPVEPlotDes.Instance != null)
            {
                JCPVEPlotDes.Instance.OnBtnClick("Btn_Fight");
            }
            break;

        case EventTypeDefine.Click_FightButton:
            if (FightRoleSelectPanel.Instance != null)
            {
                FightRoleSelectPanel.Instance.OnBtnClick("Btn_Fight");
            }
            UIGuide.Instance.hand.gameObject.SetActive(false);
            break;

        case EventTypeDefine.Click_SecondGuanKa:
        {
            if (JCPVEPlotController.Instance != null)
            {
                JCPVEPlotController.Instance.OnBuildingClick("60102");
            }
        }
        break;

        case EventTypeDefine.Click_ExitPlotFB:
        {
            if (JCPVEPlotController.Instance != null)
            {
                JCPVEPlotController.Instance.OnBtnClick("Btn_Close");
            }
            Core.Data.guideManger.SetMainSceensDefaultPostion();
        }
        break;

        case EventTypeDefine.Click_ThirdGuaKa:
            if (JCPVEPlotController.Instance != null)
            {
                JCPVEPlotController.Instance.OnBuildingClick("60103");
            }
            break;

        case EventTypeDefine.Click_FourthGuaKa:
            if (JCPVEPlotController.Instance != null)
            {
                JCPVEPlotController.Instance.OnBuildingClick("60104");
            }
            break;

        case EventTypeDefine.Click_SelectSecondRoleAtFightPanel:
            if (FightRoleSelectPanel.Instance != null)
            {
                FightRoleSelectPanel.Instance.OnBtnClick("all_1");
            }
            break;

        case EventTypeDefine.Click_SelectFristRoleAtFightPanel:
            if (FightRoleSelectPanel.Instance != null)
            {
                FightRoleSelectPanel.Instance.OnBtnClick("all_0");
                AsyncTask.QueueOnMainThread(Core.Data.guideManger.AutoRUN, 0.5f);
            }
            break;

        case EventTypeDefine.Click_OpenTaskPage1:           //第一次打开任务面板
            GetTaskList.count = 0;
            UITask.Open(UITaskType.MainLine);
            break;

        case EventTypeDefine.Click_OpenTaskPage2:           //第二次打开任务面板
            GetTaskList.count = 1;
            //UITask.Open(UITaskType.MainLine);
            TopMenuUI.mInstance.OnBtnTask();
            break;

        case EventTypeDefine.Click_CloseTaskPage:           //关闭任务面板
            UITask.Instance.OnBtnClick("Btn_Close");
            break;

        case EventTypeDefine.Click_GetTaskRewardButton:          //领取奖励按钮
            UITask.Instance.OnBtnClick("Btn_GetReward");
            Core.Data.guideManger.HideGuide();
            break;

        case EventTypeDefine.Click_JuQingFB_Special:         //重要: 点击剧情副本,但这里是特殊处理<因为这里会影响下一步到底是点第四关还是点第五关(默认是第四关)>
            if (Core.Data.newDungeonsManager.lastFloorId == 60104)
            {
                GuideData nextData = null;
                if (Core.Data.guideManger.ConfigData.TryGetValue(data.ID + 1, out nextData))
                {
                    nextData.ZoomX  = 1f;
                    nextData.ZoomY  = 1f;
                    nextData.MaskX  = -182f;
                    nextData.MaskY  = -220f;
                    nextData.TaskID = 155;
                }
            }
            if (JCPVEMainController.Instance != null)
            {
                JCPVEMainController.Instance.OnBtnClick("PVEType_Plot");
            }
            break;

        case EventTypeDefine.Click_FifthGuaKa:        //点击第五关
            if (JCPVEPlotController.Instance != null)
            {
                JCPVEPlotController.Instance.OnBuildingClick("60105");
            }
            break;
        }


        if (data.AutoNext == 1)
        {
            if (data.Dialogue == "null")
            {
                UIGuide.Instance.CompleteShelter();
            }
            else
            {
                Core.Data.guideManger.HideGuide();
            }
        }
    }
示例#7
0
    protected override void OnEvent(EventTypeDefine p_e, object p_param)
    {
        m_curGuide = p_e;
        switch (p_e)
        {
        case EventTypeDefine.Open_RecruitingRoom:                                                                                                                                       //打开招募
            ZhaoMuUI.OpenUI();
            DBUIController.mDBUIInstance.HiddenFor3D_UI();
            break;

        case EventTypeDefine.Click_RecruitingRoom_NewFighters:                                                                                                          //招募1
//				ZhaoMuUI.mInstance.ZhaoMuMon (ZhaoMuUI.mInstance.m_btnZhaoMu[0], true);
            break;

        case EventTypeDefine.Click_RecruitingRoom_MartialArtist:                                                                                                        //招募2
//				ZhaoMuUI.mInstance.ZhaoMuMon (ZhaoMuUI.mInstance.m_btnZhaoMu[1], true);
            break;

        case EventTypeDefine.Click_RecruitingRoom_SuperPowers:                                                                                                          //招募3
//				ZhaoMuUI.mInstance.ZhaoMuMon (ZhaoMuUI.mInstance.m_btnZhaoMu[2], true);
            break;

        case EventTypeDefine.Click_RecruitingRoom_Redeemer:                                                                                                                     //招募4
//				ZhaoMuUI.mInstance.ZhaoMuMon (ZhaoMuUI.mInstance.m_btnZhaoMu[3], true);
            break;

        case EventTypeDefine.Exit_RecruitingRoom:
            ZhaoMuUI.mInstance.OnClickExit();

            break;

        case EventTypeDefine.Open_BattleArray:
            SQYMainController.mInstance.OnBtnZhenRong();
            break;

        case EventTypeDefine.Click_BattleArray_Add:
        {
            //点击队伍第二个位置
            TeamMonsterCell cell = TeamUI.mInstance.GetMonCellByPos(0);
            if (cell != null)
            {
                cell.OnClick();
            }
            break;
        }

        case EventTypeDefine.Click_Badake:
            TeamMonsterCell cell = TeamUI.mInstance.GetMonCellByPos(1);
            if (cell != null)
            {
                cell.OnClick();
            }
            break;

        case EventTypeDefine.Click_FourStarHero:
            SQYNodeForBI bi = SQYPetBoxController.mInstance.GetBagItem(-1);
            if (bi != null)
            {
                SQYPetBoxController.mInstance.selectOneCharator(bi);
            }
            break;

        case EventTypeDefine.Click_GoToBattle:
            SQYPetBoxController.mInstance.OnBtnOK();
            break;

        case EventTypeDefine.Click_Mokey:                                                                                                                                                                               //点击阵容小悟空
            TeamMonsterCell monkey = TeamUI.mInstance.GetMonCellByPos(0);
            if (monkey != null)
            {
                monkey.OnClick();
            }
            break;

        case EventTypeDefine.Click_Atk_Equip:
            EquipmentTableManager.Instance.m_atkEquip.OnClick();
            break;

        case EventTypeDefine.Click_Gold_Cudgel:                                                                                                                                                                 //点击选择金箍棒
            List <Equipment> list = Core.Data.EquipManager.GetAllEquipByNum(JINGUBANG);
            if (list != null && list.Count > 0)
            {
                SQYNodeForBI gold = SQYPetBoxController.mInstance.GetBagItem(list[0].RtEquip.id);
                if (gold != null)
                {
                    SQYPetBoxController.mInstance.selectOneCharator(gold);
                }
            }
            break;

        case EventTypeDefine.Click_EquipBtn:
        case EventTypeDefine.Click_StrengthInBag:
            SQYPetBoxController.mInstance.OnBtnOK();
            Core.Data.guideManger.HideGuide();
            break;

        case EventTypeDefine.Click_StrengthInTeam:                                                                                                                                                      //阵容点击强化
//				for(int i = 0; i < 3; i++)
//				{
//					RuntimeMonster rtData = new RuntimeMonster();
//					rtData.addStar = 0;
//					rtData.Attribute = (MonsterAttribute)(i + 1);
//					rtData.curLevel = 15;
//					rtData.curExp = 20;
//
//					MonsterData monData = Core.Data.monManager.getMonsterByNum(10175);
//					Monster mon = new Monster(-5 - i, 10175, rtData, monData);
//					Core.Data.monManager.AddMonter(mon);
//				}

            TeamUI.mInstance.m_teamView.OnBtnQiangHua();
            break;

        case EventTypeDefine.Click_First_SubMon:                                                                                                                                                        //强化子卡1
            SQYNodeForBI first = SQYPetBoxController.mInstance.GetBagItemByStarAndPos(1, 0);
            if (first != null)
            {
                SQYPetBoxController.mInstance.selectOneCharator(first);
            }
            break;

        case EventTypeDefine.Click_Second_SubMon:                                                                                                                                                       //强化子卡2
            SQYNodeForBI second = SQYPetBoxController.mInstance.GetBagItemByStarAndPos(1, 1);
            if (second != null)
            {
                SQYPetBoxController.mInstance.selectOneCharator(second);
            }
            break;

        case EventTypeDefine.Click_Third_SubMon:                                                                                                                                                        //强化子卡3
            SQYNodeForBI third = SQYPetBoxController.mInstance.GetBagItemByStarAndPos(1, 2);
            if (third != null)
            {
                SQYPetBoxController.mInstance.selectOneCharator(third);
            }
            break;

        case EventTypeDefine.Click_GetFouStarMonCard:                                                                                                                                           //招募获取四星宠物卡
//				ZhaoMuUI.mInstance.OnClickMain();
            break;

        case EventTypeDefine.Click_TeamToMainUI:                                                                                                                                                //从阵容点击退出键返回主界面
            TeamUI.mInstance.OnBtnTeamViewWitnIndex(SQYTeamInfoView.BTN_BACK);
            break;

        case EventTypeDefine.Click_CreateProdeceBuild:                                                                                                                                          //建造经济建筑
            BuildItem build = BuildScene.mInstance.GetBuildItemByNum(830001);
            build.ClickBuild();
            break;

        case EventTypeDefine.Click_BuildGetMoney:                                                                                                                                                       //收钱
            BuildItem bd = BuildScene.mInstance.GetBuildItemByNum(830001);
            bd.OnClickGet();
            break;

        case EventTypeDefine.Click_EnterProduceBuild:                                                                                                                                           // 进入经济建筑
            BuildItem bds = BuildScene.mInstance.GetBuildItemByNum(830001);
            bds.ClickBuild();
            break;

        case EventTypeDefine.Click_ProduceBuildGetNow:                                                                                                                                          //马上收钱
            BuildLvlUpUI.mInstance.OnBtnClickOK();
            break;

        case EventTypeDefine.Click_EnterXunLianWu:                                                                                                                                                      //进入训练屋
            TrainingRoomUI.OpenUI();
            DBUIController.mDBUIInstance.HiddenFor3D_UI();
            break;

        case EventTypeDefine.Click_QianliXunLian:                                                                                                                                                       //进入潜力训练
            TrainingRoomUI.mInstance.OnClickTypes(TrainingRoomUI.mInstance.m_types[1]);
            break;

        case EventTypeDefine.Click_QianliXunLian_MainCard:                                                                                                                                      //潜力训练选择主卡
            TrainingRoomUI.mInstance.m_qianLiUI.OnClickMain();
            break;

        case EventTypeDefine.Click_SelMainCardInBag:                                                                                                                                            //潜力训练背包中选择主卡
            for (short i = 5; i >= 0; i--)
            {
                List <Monster> jingubangList = Core.Data.monManager.getMonsterListByStar(i, SplitType.None);
                if (jingubangList != null && jingubangList.Count > 0)
                {
                    SQYNodeForBI mon = SQYPetBoxController.mInstance.GetBagItem(jingubangList[0].pid);
                    SQYPetBoxController.mInstance.selectOneCharator(mon);
                    break;
                }
            }
            break;

        case EventTypeDefine.Click_OKInBag:                                                                                                                                                                     //点击确定,选择巴达克,返回潜力训练
            SQYPetBoxController.mInstance.OnBtnOK();
            break;

        case EventTypeDefine.Click_CloseMonsterLevelUpBox:
            LevelUpMsgBox.Instance.OnClose();
            break;

        case EventTypeDefine.Click_BagToZhenRong:
        case EventTypeDefine.Click_QiangHuaToBag:                      //强化界面返回背包界面
        case EventTypeDefine.Click_BagToMainScene:                     //背包界面返回主界面
            SQYPetBoxController.mInstance.OnBtnBack();
            break;

        case EventTypeDefine.Click_CreateBulid:
//				bd = BuildScene.mInstance.GetBuildItemByNum (830001);
//				bd.SendCreateBuildMsg ();
//				UIInformation.GetInstance ().mUIMallOldMan.OnClickExit ();
            break;

        case EventTypeDefine.Click_GetBuildCoin:
            UIInformation.GetInstance().mUIMallOldMan.OnClickOK();
            break;

        case EventTypeDefine.Click_AddNewRole:
            cell = TeamUI.mInstance.GetMonCellByPos(2);
            if (cell != null)
            {
                cell.OnClick();
            }
            break;

        case EventTypeDefine.GoToFate_WuKong:
            MonsterTeam    curTeam = Core.Data.playerManager.RTData.curTeam;
            List <Monster> listMon = curTeam.GetMonByNum(PlayerInfo.DEFAULT_HEAD);
            for (int i = 0; i < listMon.Count; i++)
            {
                if (curTeam.IsAllFataActive(listMon [i]))
                {
                    int pos = curTeam.GetMonsterPos(listMon [i].pid);
                    if (TeamUI.mInstance != null)
                    {
                        cell = TeamUI.mInstance.GetMonCellByPos(pos);
                        if (cell != null)
                        {
                            cell.OnClick();
                        }
                        break;
                    }
                }
            }
            break;

        case EventTypeDefine.Click_FangJU:                                                                                                                              //点击防具,进入背包,重新排序,把筋斗云放在第一位
            TeamUI.mInstance.SetShow(false);
            DBUIController.mDBUIInstance.SetViewState(RUIType.EMViewState.S_Bag, RUIType.EMBoxType.Equip_ADD_DEF);
            SQYPetBoxController.mInstance.GuideSortJinDouYun();
            break;

        case EventTypeDefine.Click_JinDouYun:                                                                                                                   //点击选择筋斗云
            bi = SQYPetBoxController.mInstance.GetBagItem(-10);
            if (bi != null)
            {
                SQYPetBoxController.mInstance.selectOneCharator(bi);
            }
            break;

        case EventTypeDefine.Click_EquJinDouYun:                                                                                                                //点击装备按钮
            SQYPetBoxController.mInstance.OnBtnOK();
            break;

        case EventTypeDefine.Click_AddRole3:                                      //点击阵容的+号,进入背包3号位
            cell = TeamUI.mInstance.GetMonCellByPos(2);
            if (cell != null)
            {
                cell.OnClick();
            }
            SQYPetBoxController.mInstance.GuideSortGuiXianRen();
            break;

        case EventTypeDefine.Click_SelectGuiXianRen:                          //选择龟仙人
            bi = SQYPetBoxController.mInstance.GetBagItem(-11);
            if (bi != null)
            {
                SQYPetBoxController.mInstance.selectOneCharator(bi);
            }
            break;

        case EventTypeDefine.Click_UpGuiXianRen:                               //点击上阵龟仙人
            SQYPetBoxController.mInstance.OnBtnOK();
            break;

        case EventTypeDefine.Click_LookZuHeSkill:
            TeamUI.mInstance.m_teamView.OnBtnSkillView();
            break;

        //三级新手引导,添加冲锋枪到背包
        case EventTypeDefine.Add_ChongFengQiangToBag:

            ItemOfReward[] reward = new ItemOfReward[] { new ItemOfReward(), new ItemOfReward() };

            reward[0].ppid = -22;
            reward[0].pid  = 40103;
            reward[0].lv   = 1;
            reward[0].num  = 1;

            reward[1].ppid = -20;
            reward[1].pid  = 40103;
            reward[1].lv   = 1;
            reward[1].num  = 1;

            Core.Data.EquipManager.AddEquip(reward);
            break;

        case EventTypeDefine.Click_BagBtn:                                                                                      //打开背包,看武器
            DBUIController.mDBUIInstance.SetViewState(RUIType.EMViewState.S_Bag, RUIType.EMBoxType.LOOK_Equipment);
            break;

        case EventTypeDefine.Click_FristGrid:                                                                           //点击选择金箍棒
            List <Equipment> equips = Core.Data.EquipManager.GetAllEquipByNum(JINGUBANG);
            SQYNodeForBI     node   = SQYPetBoxController.mInstance.GetBagItem(equips[0].RtEquip.id);
            SQYPetBoxController.mInstance.selectOneCharator(node);
            break;

        case EventTypeDefine.Click_QiangHuaEquipBtn:                                                            //点击强化
            EquipmentPanelScript.mInstance.OnStrengBtnClick();
            break;

        case EventTypeDefine.Click_SelectFristToEat:                                                                    //吃掉冲锋枪
            equips = Core.Data.EquipManager.GetAllEquipByNum(CHONGFENGQIANG);
            node   = SQYPetBoxController.mInstance.GetBagItem(equips[0].RtEquip.id);
            SQYPetBoxController.mInstance.selectOneCharator(node);
            break;

        case EventTypeDefine.Click_QiangHuaBtn:                                                                                 //点击强化
            Core.Data.guideManger.HideGuide();
            SQYPetBoxController.mInstance.OnBtnOK();
            break;

        //五级新手引导
        case EventTypeDefine.Click_SelectFristEquip:                           //点击背包的第一个装备(筋斗云)
            equips = Core.Data.EquipManager.GetAllEquipByNum(45108);
            node   = SQYPetBoxController.mInstance.GetBagItem(equips[0].RtEquip.id);
            SQYPetBoxController.mInstance.selectOneCharator(node);
            break;

        case EventTypeDefine.Click_SureJinGuBang:                          //点击确定按钮(确定选择金箍棒)
            SQYPetBoxController.mInstance.OnBtnOK();
            break;

        case EventTypeDefine.Click_SelectFristGem:                          //点击背包的第一个宝石(一级红宝石)
            node = SQYPetBoxController.mInstance.GetBagItem(-21);
            SQYPetBoxController.mInstance.selectOneCharator(node);
            break;

        case EventTypeDefine.Click_SureRedGem:                            //点击确定按钮(确定选择一级红宝石)
            SQYPetBoxController.mInstance.OnBtnOK();
            break;

        case EventTypeDefine.Click_ExitQiangHuaBag:
            DBUIController.mDBUIInstance.SetViewState(RUIType.EMViewState.H_Bag);
            DBUIController.mDBUIInstance.ShowFor2D_UI();
            break;

        case EventTypeDefine.Click_WuZhe:
            SQYMainController.mInstance.OnBtnMonster();
            break;

        case EventTypeDefine.UnLock_God_And_SecondPos:
            Core.Data.BuildingManager.ZhaoMuUnlock = true;
            Core.Data.BuildingManager.UpdateZhaoMu();
            break;

        case EventTypeDefine.Click_OpenMenuAtFB:                                                                //点击topmenuui的top按钮
            TopMenuUI.mInstance.OnBtnTop();
            break;

        case EventTypeDefine.Click_MenuAtFB_Squad:                                                              //打开阵容
            TopMenuUI.mInstance.OnBtnTeam();
            break;

        case EventTypeDefine.Click_SkillButton:                                                                 //技能升级
            TeamUI.mInstance.m_teamView.OnBtnSkillUp();
            break;

        case EventTypeDefine.Click_SuperCard:                                                                   //点击超级武者卡牌
            ZhaoMuUI.mInstance.OnClickZhaomu(2);
            break;

        case EventTypeDefine.Click_BuyOneCard:                                                                  //点购买一个
            ZhaoMuUI.mInstance.m_zhaomuSubUI.OnClickSubZhao(1);
            Core.Data.guideManger.HideGuide();
            Core.Data.temper.SetGameTouch(true);
            ZhaoMuUI.mInstance.m_zhaomuSubUI.OnClickExit();
            break;

        case EventTypeDefine.Click_JinGuBang:
            EquipmentTableManager.Instance.m_atkEquip.OnClick();
            break;

        case EventTypeDefine.Click_ReturnToSquad:
            SQYPetBoxController.mInstance.OnBtnBack();
            break;

        case EventTypeDefine.Click_ExitSquad:
            TeamUI.mInstance.OnBtnTeamViewWitnIndex(SQYTeamInfoView.BTN_BACK);
            break;

        case EventTypeDefine.Click_ReturnHome:
            TopMenuUI.mInstance.OnBtnHome();
            break;
        }
    }