Exemplo n.º 1
0
    /// <summary>
    /// Changes the state of the game.
    /// </summary>
    /// <param name="state">The game state to change to.</param>
    public static void ChangeState(GameState state)
    {
        switch (GameController.state)
        {
        }
        GameController.state = state;
        switch (state)
        {
        case GameState.TITLE:
            if (mainBattle)
            {
                BattleInterface.Dettach();
                mainBattle.End();
            }

            Cameraman.TakePosition("Overhead Title View");
            Interface.SwitchMenu("CANCEL_OVERRIDE");
            Interface.SwitchMenu("Title Screen");
            Soundman.ChangeTrack(0, true, true);
            NewBattle(new PlayerInitializer[] { new PlayerInitializer(Color.red, true, 7), new PlayerInitializer(Color.red, true, 7) }, false);
            //NewBattle(new PlayerInitializer[] { new PlayerInitializer(Color.red, true), new PlayerInitializer(Color.red, true), new PlayerInitializer(Color.red, true), new PlayerInitializer(Color.red, true), new PlayerInitializer(Color.red, true) }, false);
            break;

        case GameState.BATTLING:
            Cameraman.TakePosition("Overhead View");
            Interface.SwitchMenu("Overhead");
            Soundman.ChangeTrack(2, true, true);
            break;

        case GameState.PLACING_SHIPS:
            Soundman.ChangeTrack(-1, true, false);
            break;

        case GameState.PLAYER_SELECTION:
            Soundman.ChangeTrack(1, true, false);
            Interface.SwitchMenu("Player Selection Screen");
            PlayerSelector.Reset();
            break;
        }
    }