Beispiel #1
0
        /// <summary>
        /// Laden van de content voor het scherm als we level 2 afgewerkt hebben
        /// </summary>
        /// <param name="content">ContentManager object dat we gebruiken om textures te laden</param>
        public void Load(ContentManager content)
        {
            level2CompleteScreen = content.Load <Texture2D>("level2CompleteMenu");
            shootText            = content.Load <SpriteFont>("shootText");
            quitText             = content.Load <Texture2D>("quitbutton");

            quitButton = new ButtonScreen(new Rectangle(850, 250, quitText.Width, quitText.Height), true);
            quitButton.Load(content, "quitbutton");
        }
Beispiel #2
0
        /// <summary>
        /// Laden van de content voor het controls scherm
        /// </summary>
        /// <param name="content">ContentManager object dat we gebruiken om textures te laden</param>
        public void Load(ContentManager content)
        {
            leftArrow     = content.Load <Texture2D>("leftArrow");
            rightArrow    = content.Load <Texture2D>("rightArrow");
            upArrow       = content.Load <Texture2D>("upArrow");
            spaceTexture  = content.Load <Texture2D>("space");
            controlsImage = content.Load <Texture2D>("controlsMenu");
            mainMenuText  = content.Load <Texture2D>("mainMenuButton");

            movementText = content.Load <SpriteFont>("movementText");
            shootText    = content.Load <SpriteFont>("shootText");

            mainMenuButton = new ButtonScreen(new Rectangle(860, 450, mainMenuText.Width, mainMenuText.Height), true);
            mainMenuButton.Load(content, "mainmenubutton");
        }
Beispiel #3
0
        /// <summary>
        /// Laden van de content voor het game over scherm
        /// </summary>
        /// <param name="content">ContentManager object dat we gebruiken om textures te laden</param>
        public void Load(ContentManager content)
        {
            this.content  = content;
            gameOverImage = content.Load <Texture2D>("gameOverMenu");
            quitText      = content.Load <Texture2D>("quitbutton");
            restartText   = content.Load <Texture2D>("restartbutton");
            mainMenuText  = content.Load <Texture2D>("mainMenuButton");

            restartButton = new ButtonScreen(new Rectangle(850, 350, restartText.Width, restartText.Height), true);
            restartButton.Load(content, "restartbutton");

            quitButton = new ButtonScreen(new Rectangle(850, 450, quitText.Width, quitText.Height), true);
            quitButton.Load(content, "quitbutton");

            mainMenuButton = new ButtonScreen(new Rectangle(860, 450, mainMenuText.Width, mainMenuText.Height), true);
            mainMenuButton.Load(content, "mainmenubutton");
        }
        /// <summary>
        /// Laden van de content voor het pauze scherm
        /// </summary>
        /// <param name="content">ContentManager object dat we gebruiken om textures te laden</param>
        public void Load(ContentManager content)
        {
            this.content = content;
            pausedImage  = content.Load <Texture2D>("pausedMenu");
            quitText     = content.Load <Texture2D>("quitbutton");
            resumeText   = content.Load <Texture2D>("resumebutton");
            restartText  = content.Load <Texture2D>("restartbutton");

            quitButton = new ButtonScreen(new Rectangle(850, 450, quitText.Width, quitText.Height), true);
            quitButton.Load(content, "quitbutton");

            restartButton = new ButtonScreen(new Rectangle(850, 350, restartText.Width, restartText.Height), true);
            restartButton.Load(content, "restartbutton");

            resumeButton = new ButtonScreen(new Rectangle(850, 250, resumeText.Width, resumeText.Height), true);
            resumeButton.Load(content, "resumebutton");
        }
        /// <summary>
        /// Laden van de content voor het main menu scherm
        /// </summary>
        /// <param name="content">ContentManager object dat we gebruiken om textures te laden</param>
        public void Load(ContentManager content)
        {
            this.content    = content;
            mainScreenImage = content.Load <Texture2D>("mainMenu");
            controlsText    = content.Load <Texture2D>("controlsbutton");
            playGameText    = content.Load <Texture2D>("playbutton");
            quitText        = content.Load <Texture2D>("quitbutton");

            playGameButton = new ButtonScreen(new Rectangle(850, 250, playGameText.Width, playGameText.Height), true);
            playGameButton.Load(content, "playbutton");

            controlsButton = new ButtonScreen(new Rectangle(850, 350, controlsText.Width, controlsText.Height), true);
            controlsButton.Load(content, "controlsbutton");

            quitButton = new ButtonScreen(new Rectangle(850, 450, quitText.Width, quitText.Height), true);
            quitButton.Load(content, "quitbutton");
        }
        /// <summary>
        /// Laden van de content voor het scherm als we level 1 afgewerkt hebben
        /// </summary>
        /// <param name="content">ContentManager object dat we gebruiken om textures te laden</param>
        public void Load(ContentManager content)
        {
            this.content         = content;
            quitText             = content.Load <Texture2D>("quitbutton");
            mainMenuText         = content.Load <Texture2D>("mainMenuButton");
            nextLevelTexture     = content.Load <Texture2D>("nextlevelbutton");
            shootText            = content.Load <SpriteFont>("shootText");
            level1CompleteScreen = content.Load <Texture2D>("level1CompleteMenu");

            quitButton = new ButtonScreen(new Rectangle(850, 450, quitText.Width, quitText.Height), true);
            quitButton.Load(content, "quitbutton");

            mainMenuButton = new ButtonScreen(new Rectangle(860, 450, mainMenuText.Width, mainMenuText.Height), true);
            mainMenuButton.Load(content, "mainmenubutton");

            nextLevelButton = new ButtonScreen(new Rectangle(860, 250, nextLevelTexture.Width, nextLevelTexture.Height), true);
            nextLevelButton.Load(content, "nextlevelbutton");
        }
    IEnumerator TwitchHandleForcedSolve()
    {
        while (_phraseActions[_selectedPhraseIx].ExpectedDigit != _phraseActions[_selectedPhraseIx].ShownDigit)
        {
            ButtonDown.OnInteract();
            yield return(new WaitForSeconds(.1f));
        }

        // Wait for the right time to hold the button
        while ((int)Bomb.GetTime() % 10 != _phraseActions[_selectedPhraseIx].Hold)
        {
            yield return(true);
        }
        ButtonScreen.OnInteract();
        yield return(new WaitForSeconds(.1f));

        // Wait for the right time to release the button
        while ((int)Bomb.GetTime() % 10 != _phraseActions[_selectedPhraseIx].Release)
        {
            yield return(true);
        }
        ButtonScreen.OnInteractEnded();
        yield return(new WaitForSeconds(.1f));
    }