コード例 #1
0
ファイル: ThumbnailScreen.cs プロジェクト: DrGurka/PP_OS
        public void HandleInput(GameTime gameTime)
        {
            if (Input.Button4IsPressed && Input.Button1IsPressed && !Input.Button3IsPressed)
            {
                isActive = false;
                currentThumbnail.DisplayingInfo = false;
                MainScreen.SignInvert           = false;
                screenManager.PopScreen();
                MainScreen.thumbnailOpen = false;
                Input.DPadLeftIsPressed  = false;
                Input.DPadRightIsPressed = false;
                Input.Button1IsPressed   = false;
                Input.Button1Pressed     = false;
                Input.DPadRightPressed   = false;
                Input.DPadLeftPressed    = false;
            }

            if (Input.Button1Released && !Input.Button4IsPressed && !Input.Button3IsPressed)
            {
                isActive = false;
                currentThumbnail.RunProgram();
                screenManager.PopScreen();
                MainScreen.thumbnailOpen = false;
                Input.DPadLeftIsPressed  = false;
                Input.DPadRightIsPressed = false;
                Input.Button1IsPressed   = false;
                Input.Button1Pressed     = false;
                Input.DPadRightPressed   = false;
                Input.DPadLeftPressed    = false;
            }
        }
コード例 #2
0
        private void Gameover()
        {
            if (Game1.m_audioState == Game1.AudioState.PLAYING)
            {
                Game1.currentInstance.Stop();
            }

            m_ScreenManager.PopScreen();
            m_ScreenManager.ChangeScreen(new GameOverScreen(m_ScreenManager));
        }
コード例 #3
0
        private void SaveFile1_Click(object sender, EventArgs e)
        {
            click.Play();   //play Audio Click Effect

            if (Game1.isOnWorldMap == true)
            {
                SaveInfo(1);             //Save Information into file 1.
            }
            m_ScreenManager.PopScreen(); //pop the current screen.
        }
コード例 #4
0
 public void HandleInput(GameTime gameTime)
 {
     if (_inputManager.IsTapped(Keys.Escape))
     {
         _gameScreenManager.PopScreen();
     }
 }
コード例 #5
0
        private void SwitchListsButton_Click(object sender, EventArgs e)
        {
            click.Play();   //Play Audio Clip

            //Change SwitchListButton Text.
            if (switchListButton.Text == "Golden Keys")
            {
                switchListButton.Text = "Silver Keys";
            }

            //Call Draw to reload pics
            WorldKeyDisplay temp = new WorldKeyDisplay(m_ScreenManager);

            temp.worldDisplayed = this.worldDisplayed;
            temp.sbtext         = switchListButton.Text;

            //Change Screens Based on what screen is
            if (sbtext == "Golden Keys")
            {
                m_ScreenManager.PushScreen(temp);
            }
            else
            {
                m_ScreenManager.PopScreen();
            }

            //Set switchListButton text to golden keys.
            switchListButton.Text = "Golden Keys";
        }
コード例 #6
0
        public void Update(GameTime gameTime)
        {
            foreach (var component in m_components)
            {
                component.Update(gameTime);
            }

            if (fightStarted == false)
            {
                fightStartTimer.Elapsed += new ElapsedEventHandler(StartFight);
            }

            if (fightStarted == true)
            {
                numOfEnemies -= 1;

                if (numOfEnemies < 0)
                {
                    m_ScreenManager.PopScreen();
                }
                else
                {
                    if (Game1.m_audioState == Game1.AudioState.PLAYING)
                    {
                        Game1.currentInstance.Stop();
                    }

                    m_ScreenManager.PushScreen(new FightScreen(m_ScreenManager, "1-1"));

                    fightStarted = false;
                }
            }


            if (isMusicStopped == true && wasOptionsOpen == true)
            {
                isMusicStopped = false;
                wasOptionsOpen = false;
            }
        }
コード例 #7
0
        private void BackButton_Click(object sender, EventArgs e)
        {
            click.Play();                //Play Audio Clip

            m_ScreenManager.PopScreen(); //Pop the current Screen
        }
コード例 #8
0
        private void BackButton_Pressed()
        {
            click.Play();                //Play Audio Clip

            m_ScreenManager.PopScreen(); //Pop the current Screen
        }
コード例 #9
0
 //Closes the Options Menu
 public void CloseOptionsMenu(IGameScreenManager m_screenManager)
 {
     m_screenManager.PopScreen();
 }