Пример #1
0
        private void SetWorldBossFx(bool isShow)
        {
            if (mFx == null)
            {
                EnemyController ec = MainLandLogic.GetInstance().GetEnemyController("EnemySpawns_11");
                if (ec == null)
                {
                    EB.Debug.Log("LTWorldBossMainMenuCtrl SetWorldBOssFx ec is Null!!!");
                    return;
                }
                mFx = ec.transform.GetComponentsInChildren <ParticleSystem>();
            }

            if (mFx != null && mFx.Length > 0 && mFx[0] != null)
            {
                if ((!mFx[0].gameObject.activeInHierarchy && isShow) || (mFx[0].gameObject.activeInHierarchy && !isShow))
                {
                    for (int i = 0; i < mFx.Length; i++)
                    {
                        mFx[i].gameObject.CustomSetActive(isShow);
                        if (isShow)
                        {
                            mFx[i].Play();
                        }
                    }
                }
            }
        }
Пример #2
0
        public void OnStartBtnClick()
        {
            switch (AlliancesManager.Instance.DartData.State)
            {
            case eAllianceDartCurrentState.Transfering:
                WorldMapPathManager.Instance.StartPathFindToNpc(MainLandLogic.GetInstance().CurrentSceneName, mItemData.TargetScene, mItemData.TargetNpc);
                //TransferDartController.Instance.Close();
                break;

            default:
                AlliancesManager.Instance.Start(mItemData.Id, delegate(bool successful)
                {
                    if (successful)
                    {
                        WorldMapPathManager.Instance.StartPathFindToNpc(MainLandLogic.GetInstance().CurrentSceneName, mItemData.TargetScene, mItemData.TargetNpc);
                        //TransferDartController.Instance.Close();
                    }
                    else
                    {
                        EB.Debug.LogError("start transfer dart fail");
                    }
                });
                break;
            }
        }
Пример #3
0
        IEnumerator OnInitSceneSucced(SceneRootEntry sceneRoot)
        {
            LoadingLogic.AddCustomProgress(5);
            if (m_SceneRootEntry != null)
            {
                m_SceneRootEntry.ShowLevel();
            }
            SetShadowQuality(sceneRoot);
            SetLayerMask(sceneRoot);
            sceneRoot.SetZonesTag();
            sceneRoot.SetMainLight();
            LoadingLogic.AddCustomProgress(15);
            PSPoolManager.Instance.LoadStandardMainlandFX();
            yield return(new WaitUntil(() =>
            {
                LoadingLogic.AddCustomProgress(1);
                return HudLoadManager.Completed;
            }));

            GlobalMenuManager.PopCaches();
            MainLandLogic.GetInstance().FreshMapName();
            MainLandLogic.GetInstance().OnSceneViewLoaded();
            MainLandLogic.GetInstance().RobDartFight();
            GameEngine.Instance.IsRunFromEnterGameBtn = false;
            LoadingLogic.AddCustomProgress(5);
        }
Пример #4
0
        public void NpcLeave(string locator, SceneLogic currentlogic)
        {
            m_ManagedNpcs.Remove(locator);
            if (currentlogic != null)
            {
                currentlogic.DeleteNpc(locator);
            }
            m_GroupCellManager.ObjectLeave(locator);

            //如果是世界boss,删除之后需要立马生成下一个
            if (locator.Equals("EnemySpawns_11"))
            {
                long   id        = 0;
                string scenetype = SceneLogicManager.getSceneType();
                DataLookupsCache.Instance.SearchDataByID(scenetype + ".id", out id);

                string curLayout = "Layout50102";
                DataLookupsCache.Instance.SearchDataByID("mainlands.lastWeekBossLayoutId", out curLayout);

                Hashtable data = Johny.HashtablePool.Claim();
                data["role"]         = "w_boss";
                data["sid"]          = id;
                data["bossLayoutId"] = curLayout;

                NpcCommIn("EnemySpawns_11", data, MainLandLogic.GetInstance().CurrentSceneName, "mainlands");
            }
        }
Пример #5
0
        public override void OnExit()
        {
            base.OnExit();
            if (UITooltipManager.Instance != null)
            {
                UITooltipManager.Instance.HideTooltipForPress();
            }

            Hotfix_LT.Messenger.RemoveListener <EnemyController, eBattleType>("AttackEnemyImediatly", AttackEnemyImediatly);
            //要先于销毁当前场景的执行 先把人物,任务等逻辑卸掉,否则会有问题
            if (MainLandLogic.GetInstance() != null)
            {
                if (MainLandLogic.GetInstance().IsInScene())
                {
                    MainLandLogic.GetInstance().OnExitSceneView();
                }
                MainLandLogic.GetInstance().DestroyDynamicGameObjects();
            }

            //压缩pspool,释放mainland ps资源
            {
                PSPoolManager.Instance.CompressPool();
                PSPoolManager.Instance.UnloadStandardMainlandFX();
                EB.Assets.UnloadBundle("SpiritAnimaFx");
            }
        }
Пример #6
0
        public void EnterSceneByPlayState()
        {
            //根据CampaignTransition 返回的数据决定是进入campaign还是mainland
            string state = "";

            DataLookupsCache.Instance.SearchDataByID <string>("playstate.state", out state);
            if (state == PlayState.PlayState_MainLand)
            {
                Hashtable mainlands;
                DataLookupsCache.Instance.SearchDataByID <Hashtable>("mainlands", out mainlands);
                if (mainlands == null)
                {
                    mainlands = Johny.HashtablePool.Claim();
                }
                MainLandLogic.GetInstance().OnSceneEnter(mainlands);
            }
            else if (state == PlayState.PlayState_LCCampaign) //挑战副本
            {
                if (GameFlowControlManager.Instance != null)
                {
                    GameFlowControlManager.Instance.SendEvent("GoToInstanceView");
                }
            }
            else if (state == PlayState.PlayState_Combat)
            {
                if (GameFlowControlManager.Instance != null)
                {
                    GameFlowControlManager.Instance.SendEvent("GoToCombatView");
                }
            }
            else
            {
                EB.Debug.LogError("playstate.state is error!state = ", state);
            }
        }
Пример #7
0
        public override void OnLateUpdate()
        {
            base.OnLateUpdate();
            if (SceneLogic.SceneState != SceneLogic.eSceneState.SceneLoop)
            {
                return;
            }

            if (System.DateTime.Now < _nextHeartbeat)
            {
                return;
            }

            _nextHeartbeat = _nextHeartbeat.AddSeconds(kMovementUpdateInterval);

            PlayerController local_player_controller = PlayerManager.LocalPlayerController();

            if (local_player_controller == null)
            {
                return;
            }

            GameObject player = PlayerManager.LocalPlayerGameObject();
            Vector3    newPos = player.transform.position;
            float      newDir = player.transform.rotation.eulerAngles.y;
            float      dist   = Vector3.Distance(_PlayerPos, newPos);

            if (dist > 1.0f)
            {
                LTHotfixManager.GetManager <SceneManager>().UpdatePlayerMovement(MainLandLogic.GetInstance().SceneId, newPos, newDir, null);
                _PlayerPos = newPos;
            }

            LTHotfixManager.GetManager <SceneManager>().OnLateUpdate();
        }
Пример #8
0
        public static void NpcFind(string parameter, int activityid)
        {
            if (string.IsNullOrEmpty(parameter))
            {
                EB.Debug.LogError("Activity NavParameter (xxxscene;xxxlocator)  is illegal {0}", activityid);
                return;
            }

            string[] splits = parameter.Split(';');
            if (splits != null && splits.Length == 2)
            {
                if (AllianceUtil.GetIsInTransferDart(null))
                //if (PlayerManager.LocalPlayerController().IsPlayerInDart())
                {
                    //WorldMapPathManager.Instance.StartPathFindToNpc(MainLandLogic.GetInstance().CurrentSceneName, splits[0], splits[1]);
                }
                else
                {
                    WorldMapPathManager.Instance.StartPathFindToNpcFly(MainLandLogic.GetInstance().CurrentSceneName, splits[0], splits[1]);
                }
            }
            else
            {
                EB.Debug.LogError("Activity NavParameter (xxxscene;xxxlocator) is illegal {0}", activityid);
            }
        }
Пример #9
0
 public void RequestBountyTaskCombat(System.Action <Response> callback)
 {
     EB.Sparx.Request request = m_endPoint.Post("/mhjtasks/startBountyTaskCombat");   ///fastcampaign/requestPvECombatTransition
     request.AddData("task_id", LTBountyTaskHudController.TaskID().ToString());
     request.AddData("mainlandId", MainLandLogic.GetInstance().CurrentSceneName);
     m_endPoint.Service(request, callback);
 }
Пример #10
0
        private static IEnumerator FindNpcFly(string task_scene, string task_npc)
        {
            GlobalMenuManager.Instance.ComebackToMianMenu();
            yield return(null);

            WorldMapPathManager.Instance.StartPathFindToNpcFly(MainLandLogic.GetInstance().CurrentSceneName, task_scene, task_npc);
        }
Пример #11
0
 void DoCombatTransition(long combatid, object payload)
 {
     PlayerManagerForFilter.Instance.StopShowPlayerForGoToCombat();
     SceneLogic.BattleType = (eBattleType)EB.Dot.Integer("combat.combatType", payload, (int)SceneLogic.BattleType);
     if (SceneLogic.BattleType == eBattleType.TransferOrRob || SceneLogic.BattleType == eBattleType.PVPBattle)
     {
         WorldMapPathManager.Instance.SaveBeforePullIntoCombat();
     }
     m_currentCombatId = combatid;
     if (SceneLogic.BattleType == eBattleType.NationBattle)
     {
         FusionAudio.PostEvent("UI/Battle/StartBattle", true);
     }
     if (!UIStack.Instance.IsLoadingScreenUp)
     {
         UIStack.Instance.ShowLoadingScreen(() =>
         {
             ClearCombatCache();
             MainLandLogic.GetInstance().OnCombatTransition(payload);
         }
                                            , false, true);
     }
     else
     {
         ClearCombatCache();
         MainLandLogic.GetInstance().OnCombatTransition(payload);
     }
 }
Пример #12
0
        public void ProcessNpcCommInSync(object incomingData)
        {
            string      scenetype  = EB.Dot.String("scenetype", incomingData, "");
            IDictionary npcs       = EB.Dot.Object(scenetype + ".npc_list", incomingData, null);
            SceneLogic  scenelogic = MainLandLogic.GetInstance();

            if (scenelogic == null)
            {
                return;
            }
            if (npcs == null)
            {
                return;
            }
            foreach (DictionaryEntry entry in npcs)
            {
                if (entry.Value == null)//Player leave
                {
                    continue;
                }
                string locator = entry.Key.ToString();
                if (m_ManagedNpcs.ContainsKey(locator))
                {
                    continue;
                }
                IDictionary datatmp = entry.Value as IDictionary;
                NpcCommIn(locator, datatmp, scenelogic.CurrentSceneName, scenetype);
            }
        }
Пример #13
0
 public void BeginShowNpc()
 {
     m_IsCanShow      = true;
     m_CurrentSceneID = GetSceneId();
     ClearNotCurrentSceneNpc();
     m_CurrentSceneLogic = MainLandLogic.GetInstance();
 }
Пример #14
0
 private bool IsBusy(GameObject interactable)
 {
     if (null == interactable)
     {
         return(false);
     }
     return(MainLandLogic.GetInstance().IsBusy(interactable.name));
 }
Пример #15
0
 public void BeginShowPlayer()
 {
     m_IsCanShow      = true;
     m_CurrentSceneID = GetSceneId();
     ClearNotCurrentScenePlayer();
     NpcManager.Instance.BeginShowNpc();
     m_CurrentSceneLogic = MainLandLogic.GetInstance();
 }
Пример #16
0
        public void MergeNpc(string scenetype, IDictionary scenedata)
        {
            if (scenedata == null)
            {
                EB.Debug.LogWarning("MergeNpc SceneData is null");
                return;
            }
            IDictionary npcdata = EB.Dot.Object("npc_list", scenedata, null);

            if (npcdata == null)
            {
                EB.Debug.LogWarning("MergeNpc npc_list is null");
                return;
            }
            if (m_ManagedNpcs == null)
            {
                return;
            }
            //m_ManagedNpcs have scenedata didnt   must be clear
            SceneLogic scenelogic = MainLandLogic.GetInstance();

            if (scenelogic == null)
            {
                return;
            }
            List <string> npc_to_remove = new List <string>();

            foreach (KeyValuePair <string, NpcDelegate> kv in m_ManagedNpcs)
            {
                if (!npcdata.Contains(kv.Key))
                {
                    npc_to_remove.Add(kv.Key.ToString());
                }
            }
            for (int i = 0; i < npc_to_remove.Count; i++)
            {
                NpcLeave(npc_to_remove[i], scenelogic);
            }
            //scenedata have m_ManagedNpcs didnt   must be clear
            long sceneid = EB.Dot.Long("id", scenedata, 0);

            foreach (DictionaryEntry de in npcdata)
            {
                string locator = de.Key.ToString();
                if (!m_ManagedNpcs.ContainsKey(locator))
                {
                    if (!(de.Value is IDictionary))
                    {
                        continue;
                    }
                    IDictionary datatmp = de.Value as IDictionary;
                    datatmp.Add("sid", sceneid);
                    NpcCommIn(locator, datatmp, scenelogic.CurrentSceneName, scenetype);
                }
            }
        }
Пример #17
0
        private bool OnComplete()
        {
            if (!sceneLoaded || !hudLoaded)
            {
                return(false);
            }

            if (!DataLookupsCache.Instance.SearchDataByID <string>("playstate.state", out playState))
            {
                EB.Debug.LogWarning("DataLookupsCache ===> playstate.state can't find!");
            }

            if (string.Compare(playState, PlayState.PlayState_Combat) == 0) //若是战斗场景就进入战斗场景
            {
                int combat_session_id = -1;
                DataLookupsCache.Instance.SearchIntByID("playstate.Combat.combat_id", out combat_session_id);
                MainLandLogic.GetInstance().RequestResumeCombat(combat_session_id);
                int type = -1;
                DataLookupsCache.Instance.SearchIntByID("playstate.Combat.origin.combatType", out type);
                BattleReadyHudController.SetBattleType((eBattleType)type);
                if (type == (int)eBattleType.HeroBattle)
                {
                    LTNewHeroBattleManager.GetInstance().OnLoggedIn();
                }
                return(false);
            }
            else if (string.Compare(playState, PlayState.PlayState_InitCombat) == 0) //(合服状态也会变为init,因此新增新手引导字段判断)若是首次登录就申请开场大战
            {
                UIStack.Instance.ShowLoadingScreen(() =>
                {
                    CombatCamera.isBoss = true;
                    if (GuideNodeManager.isFirstCombatGuide())
                    {
                        GuideNodeManager.GetInstance().GetGuideNodeCompleted(delegate(bool success)
                        {
                            if (success)
                            {
                                MainLandLogic.GetInstance().RequestFastCombatTransition(eBattleType.FastCampaignBattle, "1_1");
                            }
                            else
                            {
                                MainLandLogic.GetInstance().RequestTransfer(SceneManager.MainLandName, Vector3.zero, 0, SceneManager.MainLandName, SceneManager.HeroStart, 0);
                            }
                        });
                    }
                    else
                    {
                        MainLandLogic.GetInstance().RequestTransfer(SceneManager.MainLandName, Vector3.zero, 0, SceneManager.MainLandName, SceneManager.HeroStart, 0);
                    }
                }, false, true);
                return(false);
            }
            return(true);
        }
Пример #18
0
        public void OnGotoBtnClick()
        {
            if (curActData.need_alliance && AlliancesManager.Instance.Account.State != eAllianceState.Joined)
            {
                MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, EB.Localizer.GetString("ID_codefont_in_LTDailyHudController_10226"));
                return;
            }

            if (string.IsNullOrEmpty(curActData.nav_parameter))
            {
                controller.Close();
                return;
            }

            int funcID = 0;

            int.TryParse(curActData.nav_parameter, out funcID);
            if (funcID != 0)
            {
                Hotfix_LT.Data.FuncTemplate funcTem = Hotfix_LT.Data.FuncTemplateManager.Instance.GetFunc(funcID);
                if (funcTem != null)
                {
                    Hotfix_LT.Data.FuncTemplateManager.OpenFunc(funcTem.id, funcTem.parameter);
                    //GlobalMenuManager.Instance.Open(funcTem.ui_model, funcTem.parameter);
                }
                else
                {
                    MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, EB.Localizer.GetString("ID_codefont_in_LTDailyHudController_10933"));
                    EB.Debug.LogError(string.Format("LTDaily GotoFuncID is Error, Data is Null! funcID = {0}", funcID));
                }
                return;
            }

            string[] strs = curActData.nav_parameter.Split(';');
            if (strs.Length < 2)
            {
                EB.Debug.LogError(string.Format("LTDaily NavParameter is Error, Length less than 2! activityID = {0}, param = {1}", curActData.id, curActData.nav_parameter));
            }
            else
            {
                if (AllianceUtil.GetIsInTransferDart(null))
                {
                    return;
                }

                controller.Close();
                if (strs[1].CompareTo("EnemySpawns_11") == 0)
                {
                    //世界boss特殊处理,需要走到的是目标区域,但是配置的是怪的模型
                    strs[1] = "AreaTrigger_E";
                }
                WorldMapPathManager.Instance.StartPathFindToNpcFly(MainLandLogic.GetInstance().CurrentSceneName, strs[0], strs[1]);
            }
        }
Пример #19
0
        private bool isMyTask(string dataID)
        {
            //这里的6 是有问题的 因为当id的路径变化时 长度就不是6了
            string    task_id = dataID.Remove(0, TaskSystem.TASKPREFIX_LENGTH);
            Hashtable task    = mDL.GetDefaultLookupData <Hashtable>();

            if (task == null)
            {
                return(false);
            }
            Hotfix_LT.Data.TaskTemplate taskTpl = Hotfix_LT.Data.TaskTemplateManager.Instance.GetTask(task_id);
            if (taskTpl != null)
            {
                //normal task didnot have npc
                if (taskTpl.task_type == (int)eTaskType.Normal)
                {
                    return(false);
                }
                string npc_id = m_npcName;
                string task_npc_id;
                string task_npc_scene;
                if (task["state"].Equals(TaskSystem.UNACCEPTABLE))
                {
                    task_npc_id    = /*task_template_h["npc_id"] as string; */ taskTpl.npc_id;
                    task_npc_scene = taskTpl.scene_id;
                }
                else if (task["state"].Equals(TaskSystem.ACCEPTABLE))
                {
                    task_npc_id    = /*task_template_h["npc_id"] as string; */ taskTpl.npc_id;
                    task_npc_scene = taskTpl.scene_id;
                }
                else if (task["state"].Equals(TaskSystem.RUNNING))
                {
                    task_npc_id    = /*task_template_h["commit_npc_id"] as string;*/ taskTpl.commit_npc_id;
                    task_npc_scene = taskTpl.commit_scene_id;
                }
                else if (task["state"].Equals(TaskSystem.FINISHED))
                {
                    task_npc_id    = /*task_template_h["commit_npc_id"] as string;*/ taskTpl.commit_npc_id;
                    task_npc_scene = taskTpl.commit_scene_id;
                }
                else
                {
                    task_npc_id    = /*task_template_h["npc_id"] as string;*/ taskTpl.npc_id;
                    task_npc_scene = taskTpl.scene_id;
                }
                if (!npc_id.Equals(task_npc_id) || task_npc_scene != MainLandLogic.GetInstance().CurrentSceneName)
                {
                    return(false);
                }
                return(true);
            }
            return(true);
        }
Пример #20
0
        private void OnMainLandSceneLoaded(SceneRootEntry sceneRoot)
        {
            m_State = PlayState.PlayState_MainLand;
            if (!DataLookupsCache.Instance.SearchDataByID <string>("playstate.state", out m_State))
            {
                EB.Debug.LogWarning("DataLookupsCache ===> playstate.state can't find!");
            }
            string state = m_State;

            if (string.Compare(state, PlayState.PlayState_InitCombat) == 0) //初始(合服状态也会变为init,因此新增新手引导字段判断)
            {
                if (GuideNodeManager.isFirstCombatGuide())
                {
                    GuideNodeManager.GetInstance().GetGuideNodeCompleted(delegate(bool success)
                    {
                        if (success)
                        {
                            MainLandLogic.GetInstance().RequestFastCombatTransition(eBattleType.FastCampaignBattle, "1_1");
                        }
                        else
                        {
                            MainLandLogic.GetInstance().RequestTransfer(SceneManager.MainLandName, Vector3.zero, 0, SceneManager.MainLandName, SceneManager.HeroStart, 0);
                        }
                    });
                }
                else
                {
                    MainLandLogic.GetInstance().RequestTransfer(SceneManager.MainLandName, Vector3.zero, 0, SceneManager.MainLandName, SceneManager.HeroStart, 0);
                }
            }
            else if (string.Compare(state, PlayState.PlayState_MainLand) == 0) //主城
            {
                Hashtable mainland_session = null;
                DataLookupsCache.Instance.SearchDataByID <Hashtable>("mainlands", out mainland_session);
                if (mainland_session != null)
                {
                    MainLandLogic.GetInstance().OnSceneEnter(mainland_session);
                }
            }
            else if (string.Compare(state, PlayState.PlayState_LCCampaign) == 0)//副本
            {
                if (GameFlowControlManager.Instance != null)
                {
                    GameFlowControlManager.Instance.SendEvent("GoToInstanceView");
                }
            }
            else if (string.Compare(state, PlayState.PlayState_Combat) == 0)//战斗
            {
                if (GameFlowControlManager.Instance != null)
                {
                    GameFlowControlManager.Instance.SendEvent("GoToMainLandView");
                }
            }
        }
Пример #21
0
 public void OnContinueBtnClick()
 {
     if (AllianceUtil.GetIsInTransferDart(null))
     {
         //WorldMapPathManager.Instance.StartPathFindToNpc(MainLandLogic.GetInstance().CurrentSceneName, Hotfix_LT.Data.SceneTemplateManager.Instance.GetMainLandEncounter(10068).mainland_name, Hotfix_LT.Data.SceneTemplateManager.Instance.GetMainLandEncounter(10068).locator);
     }
     else
     {
         WorldMapPathManager.Instance.StartPathFindToNpcFly(MainLandLogic.GetInstance().CurrentSceneName, Hotfix_LT.Data.SceneTemplateManager.Instance.GetMainLandEncounter(10068).mainland_name, Hotfix_LT.Data.SceneTemplateManager.Instance.GetMainLandEncounter(10068).locator);
     }
     controller.Close();
 }
Пример #22
0
 public void OnFirstCombatClick()
 {
     controller.Close();
     InputBlockerManager.Instance.Block(InputBlockReason.FUSION_BLOCK_UI_INTERACTION, 0.5f);
     System.Action startCombatCallback = delegate() {
         UIStack.Instance.ShowLoadingScreen(() =>
         {
             CombatCamera.isBoss = true;
             MainLandLogic.GetInstance().RequestFastCombatTransition(eBattleType.FastCampaignBattle, "1_1");
         }, false, true);
     };
     BattleReadyHudController.Open(eBattleType.FastCampaignBattle, startCombatCallback);
 }
Пример #23
0
        public void bossBloodUpdate(object payload)
        {
            long left = 1;

            left = EB.Dot.Long("world_boss.blood.l", payload, left);
            if (left <= 0)
            {
                if (SceneLogic.SceneState == SceneLogic.eSceneState.SceneLoop && MainLandLogic.GetInstance().CurrentSceneName == MainLandName)
                {
                    Hotfix_LT.Messenger.Raise(Hotfix_LT.EventName.BossDieEvent);
                }
                AutoRefreshingManager.Instance.RemoveWorldBossRollingMsg();
            }
        }
Пример #24
0
        void OnIdleFollow()
        {
            if (LTSpeedSnatchILRModel.GetInstance().hasRequire)
            {
                return;
            }

            if (MainLandLogic.GetInstance().SceneId == 0)
            {
                return;
            }
            LTSpeedSnatchILRModel.GetInstance().firstEnterMainLand = true;
            GetSpeedSnatchBase();
        }
Пример #25
0
        public void NpcLocatorTriggerEnter(string locator, GameObject triggerOb)
        {
            EnemyController enemy = MainLandLogic.GetInstance().GetEnemyController(locator);

            if (enemy == null)
            {
                return;
            }
            Player.EnemyHotfixController ehc = enemy.HotfixController._ilrObject as Player.EnemyHotfixController;
            if (ehc.IsBodyActive())
            {
                return;
            }

            NpcTriggerAction(locator, triggerOb);
        }
Пример #26
0
 void OnNotifyHeroBattleFinish()
 {
     if (_HeroBattleFinish)
     {
         return;
     }
     _HeroBattleFinish     = true;
     SceneLogic.SceneState = SceneLogic.eSceneState.DelayCombatTransition;//选英雄界面 延迟进战斗场景
     MainLandLogic.GetInstance().DoDelayCombatTransition(3, 5,
                                                         (bool isDO) =>
     {
         _HeroBattleFinish     = false;
         SceneLogic.SceneState = SceneLogic.eSceneState.RequestingCombatTransition;
     }
                                                         );
 }
Пример #27
0
        public bool ExcuteExReal(Transform Frame, System.Action onFinish)
        {
            bool started = false;

            if (HasGuidNow())
            {
                GuideStepData now;
                if (!GetStep(m_StepCurrentId, out now))
                {
                    return(false);
                }
                if (!Frame.name.Contains(now.view))
                {
                    return(false);
                }
                if (string.IsNullOrEmpty(now.target_path))
                {
                    GuideManager.Instance.ExcuteCurrentStep(null, onFinish);
                }
                else
                {
                    Transform target = null;
                    if (now.excute_type.Equals("CampaignGuideStep"))
                    {
                        target = MainLandLogic.GetInstance().ThemeLoadManager.GetSceneRootObject().transform.Find(now.target_path);
                    }
                    else
                    {
                        target = Frame.Find(now.target_path);
                    }
                    if (target == null)
                    {
                        EB.Debug.LogWarning("Cant find obj for{0} for {1}", now.target_path, m_StepCurrentId);
                        return(false);
                    }
                    else if (!target.gameObject.activeInHierarchy)
                    {
                        return(false);
                    }
                    InputBlockerManager.Instance.Block(InputBlockReason.CONVERT_FLY_ANIM, 0.2f);                    //防止连续的点击
                    m_CurrentFrame = Frame;
                    GuideManager.Instance.ExcuteCurrentStep(target.gameObject, onFinish);
                }
                started = true;
            }
            return(started);
        }
Пример #28
0
        public void OnNpcFuncBtnClick()
        {
            if (AllianceUtil.IsInTransferDart)
            {
                MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, EB.Localizer.GetString("ID_codefont_in_FuncOpenConditionComponent_4248"));
                return;
            }

            if (m_FuncTpl == null)
            {
                return;
            }

            var encounterTpl = Hotfix_LT.Data.SceneTemplateManager.Instance.GetMainLandEncounter(m_FuncId);

            WorldMapPathManager.Instance.StartPathFindToNpcFly(MainLandLogic.GetInstance().CurrentSceneName, encounterTpl.mainland_name, encounterTpl.locator);
        }
Пример #29
0
        public static void Dispose()
        {
            SceneState = eSceneState.NoneScene;
            if (m_Instance != null)
            {
                m_Instance.StopAllCoroutines();
            }
            GameObject go = GameObject.Find("_MainLandLogic");

            if (go != null)
            {
                GameObject.Destroy(go);
            }

            m_Instance = null;
            m_Inited   = false;
        }
Пример #30
0
        public void OnSkinBtnClick()
        {
            int skinIndex = curObj.GetComponent <LTPartnerSkinItem>().GetSkinIndex();
            int sceneId   = MainLandLogic.GetInstance().SceneId;

            LTPartnerDataManager.Instance.PartnerUseAwakeSkin(heroId, skinIndex, sceneId, new System.Action <bool>(delegate {
                var partner = LTPartnerDataManager.Instance.RefreshSkinData(heroId);
                Hotfix_LT.Messenger.Raise(Hotfix_LT.EventName.OnPartnerAwakenSucc, partner);
                SetGetTipLabel(partner, skinIndex);
                if (partner.StatId == LTMainHudManager.Instance.UserLeaderTID)
                {
                    if (!AllianceUtil.IsInTransferDart)
                    {
                        Hotfix_LT.Messenger.Raise("SetLeaderEvent");
                    }
                }
            }));
        }