private void CallBack(ActionType actionType, UIBattleFormationKindSelectManager calledObject, UIBattleFormationKind centerView)
 {
     if (mUIBattleFormationKindSelectManagerAction != null)
     {
         mUIBattleFormationKindSelectManagerAction(actionType, this, centerView);
     }
 }
        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);
            }
        }
 private void OnDestroy()
 {
     mStateManager = null;
     UserInterfacePortManager.ReleaseUtils.Release(ref mWidgetThis);
     mPracticeBattleTargetSelect                = null;
     mUIPracticeBattleStartProduction           = null;
     mPracticeBattleConfirm                     = null;
     mCommonDialog_Dialog                       = null;
     mPrefab_UIBattleFormationKindSelectManager = null;
     mPracticeMenu           = null;
     mCamera_CatchTouchEvent = null;
     mPracticeManager        = null;
     mKeyController          = null;
     mOnBackListener         = null;
     mBattlePracticeContext  = null;
     mOnChangedStateListener = null;
     mOnCommitBattleListener = null;
 }
        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);
        }
        private void UIBattleFormationKindSelectManagerActionCallBack(UIBattleFormationKindSelectManager.ActionType actionType, UIBattleFormationKindSelectManager calledObject, UIBattleFormationKind centerView)
        {
            calledObject.OnReleaseKeyController();
            BattleFormationKinds1 iFormation = (actionType != 0) ? BattleFormationKinds1.TanJuu : centerView.Category;

            OnFormationSelected(iFormation);
        }
        private void UIBattleFormationKindSelectManagerActionCallBack(UIBattleFormationKindSelectManager.ActionType actionType, UIBattleFormationKindSelectManager calledObject, UIBattleFormationKind centerView)
        {
            calledObject.OnReleaseKeyController();
            BattleFormationKinds1 iFormation;

            if (actionType != UIBattleFormationKindSelectManager.ActionType.Select)
            {
                iFormation = BattleFormationKinds1.TanJuu;
            }
            else
            {
                iFormation = centerView.Category;
            }
            this.OnFormationSelected(iFormation);
        }