Exemplo n.º 1
0
        public BookStoreGamePlay()
        {
            ChosenBackground chosenbackground = ChosenBackground.background1;

            // TODO: Add your initialization logic here
            // textures for background change
            #region ChangingBackground array initiation
            changingbackgrounds = new Texture2D[10];
            #endregion

            texttospeechengine = new TextToSpeechEngine();
            texttospeechobject = new TextToSpeechObject();

            reading           = Reading.nothing;
            backgroundchanger = 1;
            buttonobject      = new ChangingBackgroundButtonObject();
            buttonengine      = new ChangingBackgroundButtonEngine();
            //background key initialize
            backgroundkey = new KeyboardState();

            changingbackgroundsrect = new Rectangle(0, 0, 800, 600);

            place = new string[1];

            place[0]       = "I I T";
            title          = new string[1];
            title[0]       = "Bookstore";
            phonenumber    = new string[1];
            phonenumber[0] = "3 1 2 5 6 7 3 1 2 0";

            website        = new string[1];
            website[0]     = "yourschoolyourbookstore.com";
            explination    = new string[1];
            explination[0] = "A complete line of books, supplies, architecture/engineering equipment, and IIT gifts and clothing are available in the IIT Main Campus, Barnes and Noble Bookstore.";
        }
        public CampusInformationCenter()
        {
            ChosenBackground chosenbackground = ChosenBackground.background1;

            // TODO: Add your initialization logic here
            // textures for background change
            #region ChangingBackground array initiation
            changingbackgrounds = new Texture2D[10];
            #endregion

            texttospeechengine = new TextToSpeechEngine();
            texttospeechobject = new TextToSpeechObject();

            reading           = Reading.nothing;
            backgroundchanger = 1;
            buttonobject      = new ChangingBackgroundButtonObject();
            buttonengine      = new ChangingBackgroundButtonEngine();
            //background key initialize
            backgroundkey = new KeyboardState();

            changingbackgroundsrect = new Rectangle(0, 0, 800, 600);

            place = new string[1];

            place[0]       = "I I T";
            title          = new string[1];
            title[0]       = "Campus Information Center";
            phonenumber    = new string[1];
            phonenumber[0] = "3 1 2 5 6 7 3 7 0 0";

            website        = new string[1];
            website[0]     = "iit.edu/campus_and_conference_centers";
            explination    = new string[1];
            explination[0] = "The Campus Information Center is your one-stop shop for any questions you have regarding the university. The CIC is located right outside of the MTCC Commons.";
        }
Exemplo n.º 3
0
        public ChangingBackgroundState()
        {
            ChosenBackground chosenbackground = ChosenBackground.background1;

            // TODO: Add your initialization logic here
            // textures for background change
            #region ChangingBackground array initiation
            changingbackgrounds = new Texture2D[10];
            #endregion

            texttospeechengine = new TextToSpeechEngine();
            texttospeechobject = new TextToSpeechObject();

            reading           = Reading.nothing;
            backgroundchanger = 1;
            buttonobject      = new ChangingBackgroundButtonObject();
            buttonengine      = new ChangingBackgroundButtonEngine();
            //background key initialize
            backgroundkey = new KeyboardState();

            changingbackgroundsrect = new Rectangle(0, 0, 800, 600);

            place = new string[1];

            place[0]       = "mccormik tribune campus center";
            title          = new string[1];
            title[0]       = "Academic Resource Center";
            phonenumber    = new string[1];
            phonenumber[0] = "3 1 2 5 6 7 5 2 1 6";

            website        = new string[1];
            website[0]     = "arc.iit.edu";
            explination    = new string[1];
            explination[0] = "The Academic Resource Center (ARC) is a comprehensive center with a variety of free services for students and faculty.";
        }
Exemplo n.º 4
0
        /// <summary>
        /// Allows the game to run logic such as updating the world,
        /// checking for collisions, gathering input, and playing audio.
        /// </summary>
        /// <param name="gameTime">Provides a snapshot of timing values.</param>
        public override void Update(GameTime gameTime)
        {
            // pheonomina the keyboard states are mapped to getstate
            backgroundkey = Keyboard.GetState();

            buttonengine.Update(gameTime);


            buttonengine.ReceiveFrom_ButtonObject(buttonobject.gogobuttonrect);
            buttonobject.ReceiveFrom_ButtonEngine(buttonengine.SendTo_ButtonObject());
            #region ChosenBackground KeyboardKeys

            if (backgroundkey.IsKeyDown(Keys.D0))
            {
                chosenbackground = ChosenBackground.background1;
            }

            if (backgroundkey.IsKeyDown(Keys.D1))
            {
                chosenbackground = ChosenBackground.background2;
            }
            if (backgroundkey.IsKeyDown(Keys.D2))
            {
                chosenbackground = ChosenBackground.background3;
            }

            if (backgroundkey.IsKeyDown(Keys.D3))
            {
                chosenbackground = ChosenBackground.background4;
            }
            if (backgroundkey.IsKeyDown(Keys.D4))
            {
                chosenbackground = ChosenBackground.background5;
            }
            if (backgroundkey.IsKeyDown(Keys.D5))
            {
                chosenbackground = ChosenBackground.background6;
            }
            if (backgroundkey.IsKeyDown(Keys.D6))
            {
                chosenbackground = ChosenBackground.background7;
            }
            if (backgroundkey.IsKeyDown(Keys.D7))
            {
                chosenbackground = ChosenBackground.background8;
            }
            if (backgroundkey.IsKeyDown(Keys.D8))
            {
                chosenbackground = ChosenBackground.background9;
            }
            if (backgroundkey.IsKeyDown(Keys.D9))
            {
                chosenbackground = ChosenBackground.background10;
            }
            // TODO: Add your update logic here
            #endregion

            texttospeechengine.Update(gameTime);


            texttospeechobject.ControlledBy_TextToSpeechEngine(texttospeechengine.Controlling_TextToSpeechObject());


            if (Keyboard.GetState(PlayerIndex.One).IsKeyDown(Keys.A))
            {
                reading = Reading.place;
            }
            else if (Keyboard.GetState(PlayerIndex.One).IsKeyDown(Keys.S))
            {
                reading = Reading.title;
            }
            else if (Keyboard.GetState(PlayerIndex.One).IsKeyDown(Keys.D))
            {
                reading = Reading.phonenumber;
            }
            else if (Keyboard.GetState(PlayerIndex.One).IsKeyDown(Keys.F))
            {
                reading = Reading.website;
            }
            else if (Keyboard.GetState(PlayerIndex.One).IsKeyDown(Keys.G))
            {
                reading = Reading.explination;
            }
            else if (Keyboard.GetState(PlayerIndex.One).IsKeyDown(Keys.Left))
            {
                ScreenManager.Instance.AddScreen(new CampusInformationCenter());
            }

            if (Reading.place == reading)
            {
                texttospeechengine.ReceiveFrom_TextToSpeechObject(place);
                reading = Reading.nothing;
            }

            else if (Reading.title == reading)
            {
                texttospeechengine.ReceiveFrom_TextToSpeechObject(title);
                reading = Reading.nothing;
            }

            else if (Reading.phonenumber == reading)
            {
                texttospeechengine.ReceiveFrom_TextToSpeechObject(phonenumber);
                reading = Reading.nothing;
            }

            else if (Reading.website == reading)
            {
                texttospeechengine.ReceiveFrom_TextToSpeechObject(website);
                reading = Reading.nothing;
            }
            else if (Reading.explination == reading)
            {
                texttospeechengine.ReceiveFrom_TextToSpeechObject(explination);
                reading = Reading.nothing;
            }


            ////////////////////////////////////
            //texttospeechengine.ReceiveFrom_TextToSpeechObject(spokenidnumberarray);
            //////////////////////////////////////
        }
Exemplo n.º 5
0
        /// <summary>
        /// Allows the game to run logic such as updating the world,
        /// checking for collisions, gathering input, and playing audio.
        /// </summary>
        /// <param name="gameTime">Provides a snapshot of timing values.</param>
        public override void Update(GameTime gameTime)
        {
            // pheonomina the keyboard states are mapped to getstate
            backgroundkey = Keyboard.GetState();
            forward.Update(gameTime);
            backwards.Update(gameTime);
            buttonengine.Update(gameTime);

            timeengine.Update(gameTime);
            buttonengine.ReceiveFrom_ButtonObject(buttonobject.gogobuttonrect);
            buttonobject.ReceiveFrom_ButtonEngine(buttonengine.SendTo_ButtonObject());
            #region ChosenBackground KeyboardKeys

            if (backgroundkey.IsKeyDown(Keys.D0))
            {
                chosenbackground = ChosenBackground.background1;
            }

            if (backgroundkey.IsKeyDown(Keys.D1))
            {
                chosenbackground = ChosenBackground.background2;
            }
            if (backgroundkey.IsKeyDown(Keys.D2))
            {
                chosenbackground = ChosenBackground.background3;
            }

            if (backgroundkey.IsKeyDown(Keys.D3))
            {
                chosenbackground = ChosenBackground.background4;
            }
            if (backgroundkey.IsKeyDown(Keys.D4))
            {
                chosenbackground = ChosenBackground.background5;
            }
            if (backgroundkey.IsKeyDown(Keys.D5))
            {
                chosenbackground = ChosenBackground.background6;
            }
            if (backgroundkey.IsKeyDown(Keys.D6))
            {
                chosenbackground = ChosenBackground.background7;
            }
            if (backgroundkey.IsKeyDown(Keys.D7))
            {
                chosenbackground = ChosenBackground.background8;
            }
            if (backgroundkey.IsKeyDown(Keys.D8))
            {
                chosenbackground = ChosenBackground.background9;
            }
            if (backgroundkey.IsKeyDown(Keys.D9))
            {
                chosenbackground = ChosenBackground.background10;
            }
            // TODO: Add your update logic here
            #endregion

            //   texttospeechengine.Update(gameTime);

            if (MediaPlayer.State == MediaState.Stopped)
            {
                MediaPlayer.Play(backgroundmusic);
            }
            #region  Time Engine


            if ((int)timeengine.SendTo_BallObjectEngine() == 1)
            {
                chosenbackground = ChosenBackground.background1;
            }
            else if ((int)timeengine.SendTo_BallObjectEngine() == 2)
            {
                chosenbackground = ChosenBackground.background2;
            }
            else if ((int)timeengine.SendTo_BallObjectEngine() == 3)
            {
                chosenbackground = ChosenBackground.background3;
            }
            else if ((int)timeengine.SendTo_BallObjectEngine() == 4)
            {
                chosenbackground = ChosenBackground.background4;
            }
            else if ((int)timeengine.SendTo_BallObjectEngine() == 5)
            {
                chosenbackground = ChosenBackground.background5;
            }
            else if ((int)timeengine.SendTo_BallObjectEngine() == 6)
            {
                chosenbackground = ChosenBackground.background6;
            }
            else if ((int)timeengine.SendTo_BallObjectEngine() == 7)
            {
                chosenbackground = ChosenBackground.background7;
            }
            else if ((int)timeengine.SendTo_BallObjectEngine() == 8)
            {
                chosenbackground = ChosenBackground.background8;
            }
            else if ((int)timeengine.SendTo_BallObjectEngine() == 9)
            {
                chosenbackground = ChosenBackground.background9;
            }
            else if ((int)timeengine.SendTo_BallObjectEngine() == 10)
            {
                chosenbackground = ChosenBackground.background10;
            }
            #endregion
            //   texttospeechobject.ControlledBy_TextToSpeechEngine(texttospeechengine.Controlling_TextToSpeechObject());


            if (Keyboard.GetState(PlayerIndex.One).IsKeyDown(Keys.A))
            {
                reading = Reading.place;
            }
            else if (Keyboard.GetState(PlayerIndex.One).IsKeyDown(Keys.S))
            {
                reading = Reading.title;
            }
            else if (Keyboard.GetState(PlayerIndex.One).IsKeyDown(Keys.D))
            {
                reading = Reading.phonenumber;
            }
            else if (Keyboard.GetState(PlayerIndex.One).IsKeyDown(Keys.F))
            {
                reading = Reading.website;
            }
            else if (Keyboard.GetState(PlayerIndex.One).IsKeyDown(Keys.G))
            {
                reading = Reading.explination;
            }

            else if (Keyboard.GetState(PlayerIndex.One).IsKeyDown(Keys.Up))
            {
                //       ScreenManager.Instance.AddScreen(new BookStoreGamePlay());
            }
            if (Reading.place == reading)
            {
                //       texttospeechengine.ReceiveFrom_TextToSpeechObject(place);
                reading = Reading.nothing;
            }

            else if (Reading.title == reading)
            {
                //      texttospeechengine.ReceiveFrom_TextToSpeechObject(title);
                reading = Reading.nothing;
            }

            else if (Reading.phonenumber == reading)
            {
                //        texttospeechengine.ReceiveFrom_TextToSpeechObject(phonenumber);
                reading = Reading.nothing;
            }

            else if (Reading.website == reading)
            {
                //      texttospeechengine.ReceiveFrom_TextToSpeechObject(website);
                reading = Reading.nothing;
            }
            else if (Reading.explination == reading)
            {
                //    texttospeechengine.ReceiveFrom_TextToSpeechObject(explination);
                reading = Reading.nothing;
            }


            ////////////////////////////////////
            //texttospeechengine.ReceiveFrom_TextToSpeechObject(spokenidnumberarray);
            //////////////////////////////////////

            if (Keyboard.GetState(PlayerIndex.One).IsKeyDown(Keys.Enter))
            {
                ScreenManager.Instance.AddScreen(ScreenManager.resumevideogame);
            }
        }