Exemplo n.º 1
0
 /// <summary>
 /// Draws the open button.
 /// </summary>
 /// <param name="entity">Entity.</param>
 private void DrawOpenButton(ISceneEntity entity)
 {
     _colorStack.Push(ColorPalette.GetColor(entity));
     GUI.skin.button.alignment = TextAnchor.MiddleLeft;
     if (GUILayout.Button(GetContent(entity)) && !entity.IsActive)
     {
         SceneMainPanelUtility.OpenScene(entity);
     }
     GUI.skin.button.alignment = TextAnchor.MiddleCenter;
     _colorStack.Pop();
 }
Exemplo n.º 2
0
 private void GoToFuture()
 {
     if (_forwardSelected != 0 && !SceneMainPanelUtility.IsPlaying)
     {
         for (int i = 0; i <= _forwardSelected; ++i)
         {
             _history.Forward();
         }
         SceneMainPanelUtility.OpenScene(_history.CurrentScene);
         _forwardSelected = 0;
     }
 }
Exemplo n.º 3
0
 private void GoToPast()
 {
     if (_backSelected != 0 && !SceneMainPanelUtility.IsPlaying)
     {
         for (int i = 0; i < _backSelected; ++i)
         {
             _history.Back();
         }
         SceneMainPanelUtility.OpenScene(_history.CurrentScene);
         _backSelected = 0;
     }
 }
Exemplo n.º 4
0
        /// <summary>
        /// Restores from play.
        /// </summary>
        public void RestoreFromPlay()
        {
            if (!_justLoaded)
            {
                return;
            }
            if (!_restoreOnStop)
            {
                return;
            }

            var item = _history.CurrentScene;

            SceneMainPanelUtility.OpenScene(item);
            _justLoaded = false;
        }
Exemplo n.º 5
0
        private void ForwardButtonAction()
        {
            var item = _history.Forward();

            SceneMainPanelUtility.OpenScene(item);
        }
Exemplo n.º 6
0
        private void BackButtonAction()
        {
            var item = _history.Back();

            SceneMainPanelUtility.OpenScene(item);
        }