コード例 #1
0
        private void OnPushStateFormationSelect()
        {
            HashSet <BattleFormationKinds1> selectableFormations = DeckUtil.GetSelectableFormations(mBattlePracticeContext.FriendDeck);

            BattleFormationKinds1[] array = (from w in selectableFormations
                                             where true
                                             select w).ToArray();
            mPracticeBattleTargetSelect.SetActive(isActive: false);
            mPracticeMenu.SetActive(isActive: false);
            if (1 < array.Count())
            {
                GameObject gameObject = GameObject.Find("Live2DRender");
                if (gameObject != null)
                {
                    UIPanel component = gameObject.GetComponent <UIPanel>();
                    if (component != null)
                    {
                        component.depth = 6;
                    }
                }
                UIBattleFormationKindSelectManager battleFormationKindSelectManager = Util.Instantiate(mPrefab_UIBattleFormationKindSelectManager.gameObject, base.transform.gameObject).GetComponent <UIBattleFormationKindSelectManager>();
                battleFormationKindSelectManager.Initialize(mCamera_CatchTouchEvent, array, manualUpdate: true);
                battleFormationKindSelectManager.SetOnUIBattleFormationKindSelectManagerAction(delegate(UIBattleFormationKindSelectManager.ActionType actionType, UIBattleFormationKindSelectManager calledObject, UIBattleFormationKind centerView)
                {
                    int width2 = StrategyTopTaskManager.Instance.UIModel.Character.GetWidth();
                    int num2   = -960 - Mathf.Abs(width2) / 2;
                    StrategyTopTaskManager.Instance.UIModel.Character.moveAddCharacterX(num2, 1f, null);
                    BattleFormationKinds1 category = centerView.Category;
                    mBattlePracticeContext.SetFormationType(category);
                    mStateManager.PopState();
                    mStateManager.PushState(State.BattlePracticeProd);
                    UnityEngine.Object.Destroy(battleFormationKindSelectManager.gameObject);
                });
                mKeyController.ClearKeyAll();
                mKeyController.firstUpdate = true;
                battleFormationKindSelectManager.SetKeyController(mKeyController);
            }
            else
            {
                int width = StrategyTopTaskManager.Instance.UIModel.Character.GetWidth();
                int num   = -960 - Mathf.Abs(width) / 2;
                StrategyTopTaskManager.Instance.UIModel.Character.moveAddCharacterX(num, 1f, null);
                mBattlePracticeContext.SetFormationType(BattleFormationKinds1.TanJuu);
                mStateManager.PopState();
                mStateManager.PushState(State.BattlePracticeProd);
            }
        }
コード例 #2
0
        protected override bool Init()
        {
            App.TimeScale(1f);
            UIShortCutSwitch shortCutSwitch = SortieMapTaskManager.GetShortCutSwitch();

            shortCutSwitch.Hide();
            SortieMapTaskManager.GetUIShipCharacter().ShowInFormation(50, null);
            BattleFormationKinds1[] formationArray = SortieUtils.GetFormationArray(SortieBattleTaskManager.GetMapManager().Deck);
            if (1 < formationArray.Length)
            {
                _uiBattleFormationSelector = Util.Instantiate(SortieMapTaskManager.GetPrefabFile().prefabUIBattleFormationKindSelectManager.gameObject, SortieMapTaskManager.GetSharedPlace().gameObject).GetComponent <UIBattleFormationKindSelectManager>();
                SortieMapTaskManager.GetUIAreaMapFrame().SetMessage("陣形を選択してください。");
                _uiBattleFormationSelector.Initialize(GameObject.Find("SortieAreaCamera").GetComponent <Camera>(), formationArray);
                _uiBattleFormationSelector.SetOnUIBattleFormationKindSelectManagerAction(UIBattleFormationKindSelectManagerActionCallBack);
                _uiBattleFormationSelector.SetKeyController(SortieBattleTaskManager.GetKeyControl());
            }
            else
            {
                OnFormationSelected(BattleFormationKinds1.TanJuu);
            }
            return(true);
        }