コード例 #1
0
ファイル: AppManager.cs プロジェクト: efsjouw/D-Sports
    public void goBackInHistory()
    {
        if (panelNavigator == null)
        {
            panelNavigator = PanelNavigator.Instance;
        }

        bool previousPanel = false;

        if (panelNavigator.currentSubPanelNavigator != null)
        {
            //FIXME: Quick fix for list that is not really displayed in a next panel...
            if (panelNavigator.currentSubPanelNavigator.getCurrentIndex() == 0)
            {
                workoutPanel.createWorkout();
            }
            else
            {
                //Is a subpanel assigned and can we go back in history
                previousPanel = panelNavigator.currentSubPanelNavigator.goToPreviousInHistory();
            }
        }
        else
        {
            //If not sub panel history then check top panels
            if (!previousPanel)
            {
                previousPanel = panelNavigator.goToPreviousInHistory();
            }
            else
            {
                Application.Quit();
            }
        }
    }
コード例 #2
0
 public void Awake()
 {
     Instance = this;
 }