Beispiel #1
0
        /// <summary>
        /// シーン遷移処理:新しいシーンの作成
        /// </summary>
        private void NewTransition()
        {
            if (_nextTransitionInfo == null)
            {
                _nextTransitionInfo = new TransitionInfo();
            }

            bool clearHistory = !_nextTransitionInfo.Backable;

            SceneData nextSceneData = SceneObjectManager.NextNewScene(_nextSceneCondition, clearHistory);

            SceneData lastSceneData = SceneObjectManager.LastHistorySceneData;

            if (lastSceneData != null)
            {
                lastSceneData.ComponentManager.Enabled = _nextTransitionInfo.CurrentSceneEnabled;
                lastSceneData.ComponentManager.Visible = _nextTransitionInfo.CurrentSceneVisible;
            }

            nextSceneData.ComponentManager.Enabled = true;
            nextSceneData.ComponentManager.Visible = true;

            switch (_nextTransitionInfo.NewUpdateOrderAssignment)
            {
            case UpdateOrderAssignment.INCREMENT_FROM_BASE_VALUE:
                nextSceneData.ComponentManager.IncUpdateOrder(_nextTransitionInfo.NewBaseUpdateOrder);
                break;

            case UpdateOrderAssignment.INCREMENT_FROM_CURRENT_SCENE:
                nextSceneData.ComponentManager.IncUpdateOrder(lastSceneData != null ? lastSceneData.ComponentManager : null);
                break;

            case UpdateOrderAssignment.ADD_BASE_VALUE:
                nextSceneData.ComponentManager.AddUpdateOrder(_nextTransitionInfo.NewBaseUpdateOrder);
                break;

            case UpdateOrderAssignment.ADD_CURRENT_SCENE:
                nextSceneData.ComponentManager.AddUpdateOrder(lastSceneData != null ? lastSceneData.ComponentManager : null);
                break;
            }

            switch (_nextTransitionInfo.NewDrawOrderAssignment)
            {
            case DrawOrderAssignment.INCREMENT_FROM_BASE_VALUE:
                nextSceneData.ComponentManager.IncDrawOrder(_nextTransitionInfo.NewBaseDrawOrder);
                break;

            case DrawOrderAssignment.INCREMENT_FROM_CURRENT_SCENE:
                nextSceneData.ComponentManager.IncDrawOrder(lastSceneData != null ? lastSceneData.ComponentManager : null);
                break;

            case DrawOrderAssignment.ADD_BASE_VALUE:
                nextSceneData.ComponentManager.AddDrawOrder(_nextTransitionInfo.NewBaseDrawOrder);
                break;

            case DrawOrderAssignment.ADD_CURRENT_SCENE:
                nextSceneData.ComponentManager.AddDrawOrder(lastSceneData != null ? lastSceneData.ComponentManager : null);
                break;
            }
        }
Beispiel #2
0
        /// <summary>
        /// シーン遷移処理
        /// </summary>
        public void SceneTransition()
        {
            switch (_nextOrder)
            {
            case TransitionOrder.New:
                NewTransition();
                break;

            case TransitionOrder.Back:
                BackTransition();
                break;
            }

            _nextOrder          = TransitionOrder.None;
            _nextSceneCondition = null;
            _nextTransitionInfo = null;
        }
Beispiel #3
0
        /// <summary>
        /// シーン遷移処理:新しいシーンの作成
        /// </summary>
        private void NewTransition()
        {
            if (_nextTransitionInfo == null)
            {
                _nextTransitionInfo = new TransitionInfo();
            }

            bool clearHistory = !_nextTransitionInfo.Backable;

            SceneData nextSceneData = SceneObjectManager.NextNewScene(_nextSceneCondition, clearHistory);

            SceneData lastSceneData = SceneObjectManager.LastHistorySceneData;
            if (lastSceneData != null)
            {
                lastSceneData.ComponentManager.Enabled = _nextTransitionInfo.CurrentSceneEnabled;
                lastSceneData.ComponentManager.Visible = _nextTransitionInfo.CurrentSceneVisible;
            }

            nextSceneData.ComponentManager.Enabled = true;
            nextSceneData.ComponentManager.Visible = true;

            switch (_nextTransitionInfo.NewUpdateOrderAssignment)
            {
                case UpdateOrderAssignment.INCREMENT_FROM_BASE_VALUE:
                    nextSceneData.ComponentManager.IncUpdateOrder(_nextTransitionInfo.NewBaseUpdateOrder);
                    break;
                case UpdateOrderAssignment.INCREMENT_FROM_CURRENT_SCENE:
                    nextSceneData.ComponentManager.IncUpdateOrder(lastSceneData != null ? lastSceneData.ComponentManager : null);
                    break;
                case UpdateOrderAssignment.ADD_BASE_VALUE:
                    nextSceneData.ComponentManager.AddUpdateOrder(_nextTransitionInfo.NewBaseUpdateOrder);
                    break;
                case UpdateOrderAssignment.ADD_CURRENT_SCENE:
                    nextSceneData.ComponentManager.AddUpdateOrder(lastSceneData != null ? lastSceneData.ComponentManager : null);
                    break;
            }

            switch (_nextTransitionInfo.NewDrawOrderAssignment)
            {
                case DrawOrderAssignment.INCREMENT_FROM_BASE_VALUE:
                    nextSceneData.ComponentManager.IncDrawOrder(_nextTransitionInfo.NewBaseDrawOrder);
                    break;
                case DrawOrderAssignment.INCREMENT_FROM_CURRENT_SCENE:
                    nextSceneData.ComponentManager.IncDrawOrder(lastSceneData != null ? lastSceneData.ComponentManager : null);
                    break;
                case DrawOrderAssignment.ADD_BASE_VALUE:
                    nextSceneData.ComponentManager.AddDrawOrder(_nextTransitionInfo.NewBaseDrawOrder);
                    break;
                case DrawOrderAssignment.ADD_CURRENT_SCENE:
                    nextSceneData.ComponentManager.AddDrawOrder(lastSceneData != null ? lastSceneData.ComponentManager : null);
                    break;
            }
        }
Beispiel #4
0
        /// <summary>
        /// シーン遷移処理
        /// </summary>
        public void SceneTransition()
        {
            switch (_nextOrder)
            {
                case TransitionOrder.New:
                    NewTransition();
                    break;
                case TransitionOrder.Back:
                    BackTransition();
                    break;
            }

            _nextOrder = TransitionOrder.None;
            _nextSceneCondition = null;
            _nextTransitionInfo = null;
        }
Beispiel #5
0
 /// <summary>
 /// シーン遷移指定:新しいシーンの作成
 /// </summary>
 /// <param name="nextSceneCondition"></param>
 /// <param name="transitionInfo"></param>
 public void NewScene(SceneCondition nextSceneCondition, TransitionInfo transitionInfo)
 {
     _nextOrder = TransitionOrder.New;
     _nextSceneCondition = nextSceneCondition;
     _nextTransitionInfo = transitionInfo;
 }
Beispiel #6
0
 /// <summary>
 /// シーン遷移指定:新しいシーンの作成
 /// </summary>
 /// <param name="nextSceneCondition"></param>
 /// <param name="transitionInfo"></param>
 public void NewScene(SceneCondition nextSceneCondition, TransitionInfo transitionInfo)
 {
     _nextOrder          = TransitionOrder.New;
     _nextSceneCondition = nextSceneCondition;
     _nextTransitionInfo = transitionInfo;
 }