예제 #1
0
 public void _OnPlayPressed()
 {
     Engine.TimeScale = 1;
     state            = EGuiState.HIDDEN;
     Hide();
     GetTree().Root.GetNode <Game>("Game").Reset();
 }
예제 #2
0
    public void Back()
    {
        switch (state)
        {
        case EGuiState.HIDDEN:
            Show();
            if (GetTree().GetNodesInGroup("Players").Count > 0)
            {
                Engine.TimeScale = 0;
            }
            else
            {
                Engine.TimeScale = 1;
            }
            state = EGuiState.MAIN;
            break;

        case EGuiState.MAIN:
            Hide();
            Engine.TimeScale = 1;
            state            = EGuiState.HIDDEN;
            break;

        case EGuiState.OPTIONS:
            optionsMenu.Hide();
            mainMenu.Show();
            state = EGuiState.MAIN;
            break;

        default:
            break;
        }
    }
예제 #3
0
 public void _OnMenuPressed()
 {
     mainMenu.Hide();
     optionsMenu.Show();
     state = EGuiState.OPTIONS;
 }