コード例 #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
        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();
        }
コード例 #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
        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);
        }
コード例 #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 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");
            }
        }
コード例 #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
        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);
        }
コード例 #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 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");
                    }
                }
            }));
        }
コード例 #30
0
        public void AttackEnemyImediatly(EnemyController ec, eBattleType battletype)
        {
            if (SceneLogic.SceneState != SceneLogic.eSceneState.SceneLoop)
            {
                return;
            }

            PlayerController local_player_controller = PlayerManager.LocalPlayerController();

            if (local_player_controller == null)
            {
                return;
            }

            m_EnemiesInCombatRange.Clear();
            m_EnemiesInCombatRange.Add(ec);
            GameObject player = PlayerManager.LocalPlayerGameObject();

            if (battletype == eBattleType.HantBattle)
            {
                MainLandLogic.GetInstance().RequestBountyTaskCombatTransition();
            }
            else if (battletype == eBattleType.GhostBattle)
            {
                //夺宝奇兵 改成通过事件告诉给热更层
                FusionAudio.PostEvent("SFX_CombatView_BattleStart");
                Hotfix_LT.Messenger.Raise <string, string>("LTSpeedSnatchEvent.TouchEnemy", ec.name, MainLandLogic.GetInstance().SceneId.ToString());
            }
            else
            {
                if (ec.name == "EnemySpawns_11")
                {
                    EnemyController emCtrl = MainLandLogic.GetInstance().EnemyControllers["EnemySpawns_11"];
                    MainLandLogic.GetInstance().RequestCombatTransition(eBattleType.BossBattle, player.transform.position, player.transform.rotation, new List <EnemyController> {
                        emCtrl
                    });
                }
                else
                {
                    UIStack.Instance.ShowLoadingScreen(null, false, true);
                    MainLandLogic.GetInstance().RequestCombatTransition(battletype, player.transform.position, player.transform.rotation, m_EnemiesInCombatRange);
                }
            }
        }