public MainMenuScreen(ScreenManager manager, BackgroundScreen b, bool touch)
            : base(String.Empty)
        {
            screenManager = manager;
            touchState    = touch;
            screenManager.Game.IsMouseVisible = true;
            IsPopup = true;

            // Erstellen der menüeinträge
            MenuEntry startGameMenuEntry  = new MenuEntry("Play");
            MenuEntry optionGameMenuEntry = new MenuEntry("Options");
            MenuEntry highscoreGameMenu   = new MenuEntry("Highscores");
            MenuEntry exitMenuEntry       = new MenuEntry("Exit");


            // menu eventhandler werden angelegt
            startGameMenuEntry.Selected  += StartGameMenuEntrySelected;
            optionGameMenuEntry.Selected += OptionGameMenuSelected;
            highscoreGameMenu.Selected   += HighscoreGameMenuSelected;
            exitMenuEntry.Selected       += OnCancel;

            // Einträge werden zu liste hinzugefügt
            MenuEntries.Add(startGameMenuEntry);
            MenuEntries.Add(optionGameMenuEntry);
            MenuEntries.Add(highscoreGameMenu);
            MenuEntries.Add(exitMenuEntry);

            bscreen = b;
            head    = new Flyinghead(screenManager);

            text = new BouncingText("Loading", new Vector2(750, 500), 450, 550, 5, screenManager);
        }
예제 #2
0
 public Highscore(ScreenManager manager, BackgroundScreen b, bool touch)
 {
     EnabledGestures    = GestureType.Tap;
     screenManager      = manager;
     bscreen            = b;
     exitButtonPosition = new Vector2(900, 900);
     rect1 = new Rectangle((int)exitButtonPosition.X, (int)exitButtonPosition.Y, 100, 100);
     end   = false;
     listOfRectangles.Add(rect1);
     touchState = touch;
     screenManager.Game.IsMouseVisible = true;
 }
 public KeySelectScreen(ScreenManager manager, bool touch, BackgroundScreen b, String actionToChoose)
     : base(String.Empty)
 {
     m_currentState = new KeyboardState();
     m_currentState = Keyboard.GetState();
     screenManager  = manager;
     IsPopup        = true;
     touchstate     = touch;
     bscreen        = b;
     actionCommand  = actionToChoose;
     getBack        = false;
 }
예제 #4
0
        public OptionsScreen(ScreenManager manager, bool touch, BackgroundScreen b)
            : base(String.Empty)
        {
            screenManager = manager;
            IsPopup       = true;

            touchState = touch;

            // Erstellen der menüeinträge
            touchOptionMenuEntry    = new MenuEntry("Touch Disable");
            leftControlOptionEntry  = new MenuEntry("Moving left(" + screenManager.keys.left.ToString() + ")");
            rightControlOptionEntry = new MenuEntry("Movint right(" + screenManager.keys.right.ToString() + ")");
            jumpControlOptionEntry  = new MenuEntry("Jump(" + screenManager.keys.jump.ToString() + ")");
            shootControlOptionEntry = new MenuEntry("Shoot(" + screenManager.keys.shoot.ToString() + ")");
            MenuEntry exitMenuEntry = new MenuEntry("Exit");

            bscreen = b;

            // menu eventhandler werden angelegt
            touchOptionMenuEntry.Selected    += TouchOptionMenuEntrySelected;
            leftControlOptionEntry.Selected  += MovingLeftControlSelected;
            rightControlOptionEntry.Selected += MovingRightControlSelected;
            jumpControlOptionEntry.Selected  += JumpControlSelected;
            shootControlOptionEntry.Selected += ShootControlSelected;
            exitMenuEntry.Selected           += OnCancel;



            // Einträge werden zu liste hinzugefügt
            MenuEntries.Add(touchOptionMenuEntry);
            MenuEntries.Add(leftControlOptionEntry);
            MenuEntries.Add(rightControlOptionEntry);
            MenuEntries.Add(jumpControlOptionEntry);
            MenuEntries.Add(shootControlOptionEntry);
            MenuEntries.Add(exitMenuEntry);

            if (touchState == false)
            {
                touchOptionMenuEntry.setText("Touch Disabled");
            }
            else
            {
                touchOptionMenuEntry.setText("Touch Enabled");
            }
        }
예제 #5
0
        public BloodyPlumber()
        {
            m_graphics            = new GraphicsDeviceManager(this);
            screenManager         = new ScreenManager(this, 1920, 1080);
            Content.RootDirectory = "Assets";


            //Frame rate des Spiels 30fps
            TargetElapsedTime = TimeSpan.FromSeconds(1 / 30.0);

            Components.Add(screenManager);

            //neue screens hinzufügen
            BackgroundScreen bscreen = new BackgroundScreen(screenManager);

            screenManager.AddScreen(bscreen, null);
            screenManager.AddScreen(new MainMenuScreen(screenManager, bscreen, false), null);
        }
        public override void Update(Microsoft.Xna.Framework.GameTime gameTime, bool otherScreenHasFocus, bool coveredByOtherScreen)
        {
            if (myTick == 25)
            {
                screenManager.audioFileSystem.ninini.Play();
            }
            myTick++;
            boogey.Update(gameTime);
            TouchPanel.EnabledGestures = GestureType.None;
            helper.updateInput(listOfTouchLocations);
            if (myTick == 150)
            {
                BackgroundScreen bscreen = new BackgroundScreen(screenManager);
                screenManager.AddScreen(bscreen, null);
                screenManager.AddScreen(new MainMenuScreen(screenManager, bscreen, b_touchState), null);
                boogey.Dispose();
                ExitScreen();
            }

            base.Update(gameTime, otherScreenHasFocus, coveredByOtherScreen);
        }