コード例 #1
0
        private IEnumerator OnPushStatePracticeTypeSelectCoroutine()
        {
            DeckModel friendDeckModel = SingletonMonoBehaviour <AppInformation> .Instance.CurrentDeck;

            mPracticeHeader.UpdateHeaderText("演習選択");
            mPracticeMenu.SetActive(isActive: true);
            mPracticeMenu.Initialize(friendDeckModel);
            mKeyController.ClearKeyAll();
            mKeyController.firstUpdate = true;
            mPracticeMenu.SetKeyController(mKeyController);
            yield return(new WaitForEndOfFrame());
        }
コード例 #2
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);
            }
        }