Ejemplo n.º 1
0
    /// <summary>
    /// Draws the current state of the game to the screen.
    /// </summary>
    /// <remarks>
    /// What is drawn depends upon the state of the game.
    /// </remarks>
    public static void DrawScreen(ThemeColor color)
    {
        if (MenuController.TColor == ThemeColor.Pink)
        {
            UtilityFunctions.DrawBackground(ThemeColor.Pink);
        }
        else if (MenuController.TColor == ThemeColor.Green)
        {
            UtilityFunctions.DrawBackground(ThemeColor.Green);
        }
        else
        {
            UtilityFunctions.DrawBackground(ThemeColor.Blue);
        }

        switch (CurrentState)
        {
        case GameState.ViewingMainMenu:
            MenuController.DrawMainMenu();
            break;

        case GameState.ViewingGameMenu:
            MenuController.DrawGameMenu();
            break;

        case GameState.AlteringSettings:
            MenuController.DrawSettings();
            break;

        /*Add Theme draw*/
        case GameState.ThemeColors:
            MenuController.ThemeSettings();
            break;

        /*Added Draw MusicSettings*/
        case GameState.MusicSettings:
            MenuController.MusicSettings();
            break;

        case GameState.Deploying:
            DeploymentController.DrawDeployment();
            break;

        case GameState.Discovering:
            DiscoveryController.DrawDiscovery();
            break;

        //case GameState.EndingGame:
        //	EndingGameController.DrawEndOfGame ();
        //	break;
        case GameState.ViewingHighScores:
            HighScoreController.DrawHighScores();
            break;
        }

        UtilityFunctions.DrawAnimations();

        SwinGame.RefreshScreen();
    }
Ejemplo n.º 2
0
    /// <summary>
    /// Draws the current state of the game to the screen.
    /// </summary>
    /// <remarks>
    /// What is drawn depends upon the state of the game.
    /// </remarks>
    public static void DrawScreen()
    {
        UtilityFunctions.DrawBackground();

        switch (CurrentState)
        {
        case GameState.ViewingMainMenu:
        {
            MenuController.DrawMainMenu();
            break;
        }

        case GameState.ViewingGameMenu:
        {
            MenuController.DrawGameMenu();
            break;
        }

        case GameState.AlteringSettings:
        {
            MenuController.DrawSettings();
            break;
        }

        case GameState.Deploying:
        {
            DeploymentController.DrawDeployment();
            break;
        }

        case GameState.Discovering:
        {
            DiscoveryController.DrawDiscovery();
            break;
        }

        case GameState.EndingGame:
        {
            EndingGameController.DrawEndOfGame();
            break;
        }

        case GameState.ViewingHighScores:
        {
            HighScoreController.DrawHighScores();
            break;
        }
        }

        UtilityFunctions.DrawAnimations();

        SwinGame.RefreshScreen();
    }
Ejemplo n.º 3
0
    /// <summary>
    /// Draws the current state of the game to the screen.
    /// </summary>
    /// <remarks>
    /// What is drawn depends upon the state of the game.
    /// </remarks>
    public static void DrawScreen()
    {
        UtilityFunctions.DrawBackground();

        switch (CurrentState)
        {
        case GameState.ViewingMainMenu:
            MenuController.DrawMainMenu();
            SwinGame.StopTimer(Timer);
            break;

        case GameState.ViewingGameMenu:
            MenuController.DrawGameMenu();
            SwinGame.StopTimer(Timer);
            break;

        case GameState.AlteringSettings:
            MenuController.DrawSettings();
            SwinGame.StopTimer(Timer);
            break;

        case GameState.Deploying:
            DeploymentController.DrawDeployment();
            SwinGame.ResetTimer(Timer);
            break;

        case GameState.Discovering:
            DiscoveryController.DrawDiscovery();
            if (SwinGame.TimerTicks(Timer) == 0)
            {
                SwinGame.StartTimer(Timer);
            }
            break;

        case GameState.EndingGame:
            EndingGameController.DrawEndOfGame();
            break;

        case GameState.ViewingHighScores:
            HighScoreController.DrawHighScores();
            SwinGame.StopTimer(Timer);
            break;

        case GameState.ViewInstruction:
            Instruction.WriteInstruction();
            break;
        }

        UtilityFunctions.DrawAnimations();

        SwinGame.RefreshScreen();
    }
Ejemplo n.º 4
0
    /// <summary>
    /// Draws the current state of the game to the screen.
    /// </summary>
    /// <remarks>
    /// What is drawn depends upon the state of the game.
    /// </remarks>
    public static void DrawScreen()
    {
        UtilityFunctions.DrawBackground();

        if (CurrentState == GameState.ViewingMainMenu)
        {
            SwinGame.StopTimer(GameTimer);
            MenuController.DrawMainMenu();
        }
        else if (CurrentState == GameState.ViewingGameMenu)
        {
            SwinGame.StopTimer(GameTimer);
            MenuController.DrawGameMenu();
        }
        else if (CurrentState == GameState.AlteringSettings)
        {
            SwinGame.StopTimer(GameTimer);
            MenuController.DrawSettings();
        }
        else if (CurrentState == GameState.AlterMusics)
        {
            SwinGame.StopTimer(GameTimer);
            MenuController.DrawMusicSettings();
        }
        else if (CurrentState == GameState.Deploying)
        {
            SwinGame.ResetTimer(GameTimer);
            DeploymentController.DrawDeployment();
        }
        else if (CurrentState == GameState.Discovering)
        {
            if (SwinGame.TimerTicks(GameTimer) == 0)
            {
                SwinGame.StartTimer(GameTimer);
            }
            DiscoveryController.DrawDiscovery();
        }
        else if (CurrentState == GameState.EndingGame)
        {
            EndingGameController.DrawEndOfGame();
        }
        else if (CurrentState == GameState.ViewingHighScores)
        {
            HighScoreController.DrawHighScores();
        }

        UtilityFunctions.DrawAnimations();

        SwinGame.RefreshScreen(120);
    }
Ejemplo n.º 5
0
    /// <summary>
    /// Draws the current state of the game to the screen.
    /// </summary>
    /// <remarks>
    /// What is drawn depends upon the state of the game.
    /// </remarks>
    public static void DrawScreen()
    {
        UtilityFunctions.DrawBackground();

        switch (CurrentState)
        {
        case GameState.ViewingMainMenu:
            MenuController.DrawMainMenu();
            break;

        case GameState.ViewingGameMenu:
            MenuController.DrawGameMenu();
            break;

        case GameState.AlteringSettings:
            MenuController.DrawSettings();
            break;

        // Added Function: Change Music Function
        // Author: Ernest Soo
        case GameState.AlteringMusic:
            MenuController.DrawMusic();
            break;

        // Added Function: Change Background Function // Author: Jacky Ten
        case GameState.AlteringBackground:
            MenuController.DrawBackground();
            break;

        case GameState.Deploying:
            DeploymentController.DrawDeployment();
            break;

        case GameState.Discovering:
            DiscoveryController.DrawDiscovery();
            break;

        case GameState.EndingGame:
            EndingGameController.DrawEndOfGame();
            break;

        case GameState.ViewingHighScores:
            HighScoreController.DrawHighScores();
            break;
        }

        UtilityFunctions.DrawAnimations();

        SwinGame.RefreshScreen();
    }
Ejemplo n.º 6
0
    /// <summary>
    /// Draws the current state of the game to the screen.
    /// </summary>
    /// <remarks>
    /// What is drawn depends upon the state of the game.
    /// </remarks>
    public static void DrawScreen()
    {
        UtilityFunctions.DrawBackground();

        switch (CurrentState)
        {
        case GameState.ViewingMainMenu:
            MenuController.DrawMainMenu();
            break;

        case GameState.ViewingGameMenu:
            MenuController.DrawGameMenu();
            break;

        case GameState.AlteringSettings:
            MenuController.DrawSettings();
            break;

        case GameState.ChangingMusic:
            MenuController.DrawMusicMenu();
            break;

        case GameState.Deploying:
            DeploymentController.DrawDeployment();
            break;

        case GameState.Discovering:
            DiscoveryController.DrawDiscovery();
            break;

        case GameState.EndingGame:
            EndingGameController.DrawEndOfGame();
            break;

        case GameState.ViewingHighScores:
            HighScoreController.DrawHighScores();
            break;

        case GameState.ShowingHint:
            // ShowingHint state draws the Hints on top of the regular grid
            DiscoveryController.DrawDiscovery();
            DiscoveryController.DrawHint();
            break;
        }

        UtilityFunctions.DrawAnimations();

        SwinGame.RefreshScreen();
    }
Ejemplo n.º 7
0
    /// <summary>
    /// Draws the current state of the game to the screen.
    /// </summary>
    /// <remarks>
    /// What is drawn depends upon the state of the game.
    /// </remarks>
    public static void DrawScreen()
    {
        if (SwinGame.KeyTyped(KeyCode.vk_m))
        {
            GameResources.Mute();
        }
        if (SwinGame.KeyTyped(KeyCode.vk_p))
        {
            GameResources.Play();
        }
        UtilityFunctions.DrawBackground();

        switch (CurrentState)
        {
        case GameState.ViewingMainMenu:
            MenuController.DrawMainMenu();
            break;

        case GameState.ViewingGameMenu:
            MenuController.DrawGameMenu();
            break;

        case GameState.AlteringSettings:
            MenuController.DrawSettings();
            break;

        case GameState.Deploying:
            DeploymentController.DrawDeployment();
            break;

        case GameState.Discovering:
            DiscoveryController.DrawDiscovery();
            break;

        case GameState.EndingGame:
            EndingGameController.DrawEndOfGame();
            break;

        case GameState.ViewingHighScores:
            HighScoreController.DrawHighScores();
            break;
        }

        UtilityFunctions.DrawAnimations();

        SwinGame.RefreshScreen();
    }
Ejemplo n.º 8
0
    /// <summary>
    /// Draws the current state of the game to the screen.
    /// </summary>
    /// <remarks>
    /// What is drawn depends upon the state of the game.
    /// </remarks>
    public static void DrawScreen()
    {
        UtilityFunctions.DrawBackground();

        switch (CurrentState)
        {
        case GameState.ViewingMainMenu:
            MenuController.DrawMainMenu();
            break;

        case GameState.ViewingGameMenu:
            MenuController.DrawGameMenu();
            break;

        case GameState.AlteringSettings:
            MenuController.DrawSettings();
            break;

        case GameState.Deploying:
            DeploymentController.DrawDeployment();
            MenuController.DrawCommonMenu();                      // Aerisha Changes/Additions
            break;

        case GameState.Discovering:
            DiscoveryController.DrawDiscovery();
            MenuController.DrawCommonMenu();                      // Aerisha Changes/Additions
            break;

        case GameState.EndingGame:
            EndingGameController.DrawEndOfGame();
            break;

        case GameState.ViewingHighScores:
            HighScoreController.DrawHighScores();
            MenuController.DrawScoresPage();                            // Aerisha Changes/Additions
            break;

        case GameState.ViewingInstructMenu:
            Instructions.DrawInstruct();
            break;
        }

        UtilityFunctions.DrawAnimations();

        SwinGame.RefreshScreen();
    }
Ejemplo n.º 9
0
    /// <summary>
    ///     ''' Draws the current state of the game to the screen.
    ///     ''' </summary>
    ///     ''' <remarks>
    ///     ''' What is drawn depends upon the state of the game.
    ///     ''' </remarks>
    public static void DrawScreen()
    {
        UtilityFunctions.DrawBackground();

        if (CurrentState == GameState.ViewingMainMenu)
        {
            MenuController.DrawMainMenu();
        }
        else if (CurrentState == GameState.ViewingGameMenu)
        {
            MenuController.DrawGameMenu();
        }
        else if (CurrentState == GameState.AlteringSettings)
        {
            MenuController.DrawSettings();
        }
        else if (CurrentState == GameState.ChangingMusic)          //Recently Added
        {
            MenuController.DrawMusicMenu();
        }
        else if (CurrentState == GameState.Deploying)
        {
            DeploymentController.DrawDeployment();
        }
        else if (CurrentState == GameState.AlteringOption)
        {
            MenuController.DrawOption();              //RECENTLY ADDED
        }
        else if (CurrentState == GameState.Discovering)
        {
            DiscoveryController.DrawDiscovery();
        }
        else if (CurrentState == GameState.EndingGame)
        {
            EndingGameController.DrawEndOfGame();
        }
        else if (CurrentState == GameState.ViewingHighScores)
        {
            HighScoreController.DrawHighScores();
        }

        UtilityFunctions.DrawAnimations();

        SwinGame.RefreshScreen();
    }
Ejemplo n.º 10
0
    /// <summary>
    /// Draws the current state of the game to the screen.
    /// </summary>
    /// <remarks>
    /// What is drawn depends upon the state of the game.
    /// </remarks>
    public static void DrawScreen()
    {
        UtilityFunctions.DrawBackground();

        switch (CurrentState)
        {
        case GameState.ViewingMainMenu:
            MenuController.DrawMainMenu();
            break;

        case GameState.ViewingGameMenu:
            MenuController.DrawGameMenu();
            break;

        case GameState.AlteringSettings:
            MenuController.DrawSettings();
            break;

        case GameState.Deploying:
            DeploymentController.DrawDeployment();
            break;

        case GameState.Discovering:
            DiscoveryController.DrawDiscovery();
            break;

        case GameState.EndingGame:
            EndingGameController.DrawEndOfGame();
            break;

        case GameState.ViewingHighScores:
            HighScoreController.DrawHighScores();
            break;
        }

        UtilityFunctions.DrawAnimations();

        //Lowered to 30 frames per second to see the splash and explosion animations

        SwinGame.RefreshScreen(60);
    }
Ejemplo n.º 11
0
    /// <summary>
    /// Draws the current state of the game to the screen.
    /// </summary>
    /// <remarks>
    /// What is drawn depends upon the state of the game.
    /// </remarks>
    public static void DrawScreen()
    {
        UtilityFunctions.DrawBackground();

        switch (CurrentState)
        {
        case GameState.ViewingMainMenu:
            MenuController.DrawMainMenu();
            break;

        case GameState.ViewingGameMenu:
            MenuController.DrawGameMenu();
            break;

        case GameState.AlteringSettings:
            MenuController.DrawSettings();
            break;

        case GameState.Deploying:
            DeploymentController.DrawDeployment();
            break;

        case GameState.Discovering:
            DiscoveryController.DrawDiscovery();
            SwinGame.DrawBitmap(GameResources.GameImage("HomeButton"), HOME_BUTTON_LEFT, TOP_BUTTONS_TOP);
            break;

        case GameState.EndingGame:
            EndingGameController.DrawEndOfGame();
            break;

        case GameState.ViewingHighScores:
            HighScoreController.DrawHighScores();
            break;
        }

        UtilityFunctions.DrawAnimations();

        SwinGame.RefreshScreen();
    }
Ejemplo n.º 12
0
    /// <summary>
    /// Draws the current state of the game to the screen.
    /// </summary>
    /// <remarks>
    /// What is drawn depends upon the state of the game.
    /// </remarks>
    public void DrawScreen()
    {
        screenController.DrawBackground();

        switch (CurrentState)
        {
        case GameState.ViewingMainMenu:
            _menuController.DrawMainMenu();
            break;

        case GameState.ViewingGameMenu:
            _menuController.DrawGameMenu();
            break;

        case GameState.AlteringSettings:
            _menuController.DrawSettings();
            break;

        case GameState.Deploying:
            _deploymentController.DrawDeployment();
            break;

        case GameState.Discovering:
            _discoveryController.DrawDiscovery();
            break;

        case GameState.EndingGame:
            _endingGameController.DrawEndOfGame();
            break;

        case GameState.ViewingHighScores:
            highScoreController.DrawHighScores();
            break;
        }

        screenController.DrawAnimations();

        SwinGame.RefreshScreen();
    }
Ejemplo n.º 13
0
    /// <summary>
    /// Draws the current state of the game to the screen.
    /// </summary>
    /// <remarks>
    /// What is drawn depends upon the state of the game.
    /// </remarks>
    public static void DrawScreen()
    {
        UtilityFunctions.DrawBackground();

        switch (CurrentState)
        {
        case GameState.ViewingMainMenu:
            SwinGame.StopTimer(Timer);
            MenuController.DrawMainMenu();
            break;

        case GameState.ViewingInstruction:
            SwinGame.StopTimer(Timer);
            Rules.DrawInstruction();
            break;

        case GameState.ViewingGameMenu:
            SwinGame.StopTimer(Timer);
            MenuController.DrawGameMenu();
            break;

        case GameState.AlteringSettings:
            SwinGame.StopTimer(Timer);
            MenuController.DrawSettings();
            break;

        case GameState.Deploying:
            SwinGame.ResetTimer(Timer);
            DeploymentController.DrawDeployment();
            MenuController.DrawMenuBackButton();
            break;

        case GameState.Discovering:
            if (SwinGame.TimerTicks(Timer) == 0)
            {
                SwinGame.StartTimer(Timer);
            }
            DiscoveryController.DrawDiscovery();
            break;

        case GameState.EndingGame:
            EndingGameController.DrawEndOfGame();
            break;

        case GameState.ViewingHighScores:
            SwinGame.StopTimer(Timer);
            HighScoreController.DrawHighScores();
            break;

        case GameState.AlteringOption:
            SwinGame.StopTimer(Timer);
            MenuController.DrawOption();
            break;

        case GameState.ChangingMusic:
            SwinGame.StopTimer(Timer);
            MenuController.DrawMusicMenu();
            break;

            /*case GameState.changebg:
             *      MenuController.DrawBGOption ();
             *      break;*/
        }

        UtilityFunctions.DrawAnimations();

        SwinGame.RefreshScreen();
    }