Esempio n. 1
0
        void AttackNpc(EnemyController ec, eBattleType battletype)
        {
            if (ec != null)
            {
                GameStateLoadGame loadState = GameStateManager.Instance.GetGameState <GameStateLoadGame>();
                if (GameFlowControlManager.Instance != null)
                {
                    // FsmStateAction[] actions = GameFlowControlManager.Instance.m_StateMachine.Fsm.ActiveState.Actions;
                    // if (actions == null)
                    //     return;
                    if (battletype != eBattleType.AllianceCampaignBattle)
                    {
                        // for (int i = 0; i < actions.Length; i++)
                        // {
                        //     if (actions[i] is BaseFlowAction && actions[i].State.Name == "MainLandView")
                        //     {
                        //         Hotfix_LT.Messenger.Raise("AttackEnemyImediatly", ec, battletype);
                        //     }
                        // }

                        if (GameFlowControlManager.Instance.ActiveStateName == "MainLandView")
                        {
                            Hotfix_LT.Messenger.Raise("AttackEnemyImediatly", ec, battletype);
                        }
                    }
                }
            }
        }
Esempio n. 2
0
 public static void LeaveResultScreen()
 {
     if (GameStateManager.Instance != null)
     {
         GameStateLoadGame loadState = GameStateManager.Instance.GetGameState <GameStateLoadGame>();
         UIStack.Instance.ShowLoadingScreen(() =>
         {
             if (loadState != null)
             {
                 LTHotfixManager.GetManager <SceneManager>().EnterSceneByPlayState();
             }
         }, false, true);
     }
 }
Esempio n. 3
0
        public static void DirectExitCombat()
        {
            string state = "";

            DataLookupsCache.Instance.SearchDataByID <string>("playstate.state", out state);
            if (string.IsNullOrEmpty(state) || state.CompareTo("Combat") == 0)
            {
                MainLandLogic.GetInstance().RequestCombatResumeToScene();
            }
            else
            {
                CombatLogic.Instance.ExitCombat();

                if (Camera.main != null)
                {
                    CombatCamera combat_camera = Camera.main.GetComponent <CombatCamera>();

                    if (combat_camera != null)
                    {
                        combat_camera.DisableBlurEffect();
                        combat_camera.HoldingCamera = false;
                    }
                }

                if (GameStateManager.Instance != null)
                {
                    GameStateLoadGame loadState = GameStateManager.Instance.GetGameState <GameStateLoadGame>();
                    UIStack.Instance.ShowLoadingScreen(() =>
                    {
                        if (loadState != null)
                        {
                            LTHotfixManager.GetManager <SceneManager>().EnterSceneByPlayState();
                        }
                    }, false, true);
                }
            }
        }