Ejemplo n.º 1
0
        //Super Xblox 360 Text Was here now blank
        /// <summary>
        /// Constructor fills in the menu contents.
        /// </summary>
        public TitleScreen(ScreenManager sm)
            : base(sm,"")
        {
            //Storage.LoadSettings();
            Storage.LoadHighScores();

            MediaPlayer.Volume = Storage.getsettings()[1] *(0.01f);
            //OptionsMenuScreen.soundVolume = Storage.getsettings()[0];
            svolume = Storage.getsettings()[0];
            mvolume = Storage.getsettings()[1];

            // show the controller images
            show_playercontrol = false;

            // Create our menu entries.
            MenuEntry PlayMenuEntry = new MenuEntry("");
            // Hook up menu event handlers.
            PlayMenuEntry.Selected += PlayMenuEntrySelected;

            // Add entries to the menu.
            MenuEntries.Add(PlayMenuEntry);
            //blockpositions = new Vector2[100];
               // flying_blocks = new Block[100];
            flying_shapes=new Shape[100];
            random=new Random();
            //blockcolors = new Color[100];
            for (int i = 0; i < 50; i++)
            {
                //blockpositions[i] = new Vector2();
                //flying_blocks[i] = new Block();

                //flying_blocks[i].blockcolor.A = 255;
                //flying_blocks[i].blockcolor.R = (byte)(int)(r.NextDouble() * 255);
                //flying_blocks[i].blockcolor.G = (byte)(int)(r.NextDouble() * 255);
                //flying_blocks[i].blockcolor.B = (byte)(int)(r.NextDouble() * 255);

                int X = (int)(random.NextDouble() * 1400) - 250;
                 int Y = (int)(random.NextDouble() * 1200) - 250;
                flying_shapes[i] = new Shape(X,Y);
                flying_shapes[i].Rotation = random.Next(0, 4);
                flying_shapes[i].Type = (Shape.ShapeType)(int)(random.NextDouble() * 13);
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Constructor.
        /// </summary>
        public OptionsMenuScreen(ScreenManager sm)
            : base(sm,"Options")
        {
            soundVolume = Storage.getsettings()[0];
            musicVolume = Storage.getsettings()[1];
            MediaPlayer.Volume = musicVolume * (0.01f);
            if (Storage.getsettings()[2] >= 1)
            {
                vibration = true;
            }
            else
            {
                vibration = false;
            }

            // Create our menu entries.
            //GameOptionsMenuEntry = new MenuEntry(string.Empty);
            SoundOptionsMenuEntry = new MenuEntry(string.Empty);
            MusicVolumeOptionsMenuEntry = new MenuEntry(string.Empty);
            MusicOptionsMenuEntry = new MenuEntry(string.Empty);
            VibrationOptionsMenuEntry = new MenuEntry(string.Empty);

            SetMenuEntryText();

            MenuEntry backMenuEntry = new MenuEntry("Back");

            // Hook up menu event handlers.
            //GameOptionsMenuEntry.Selected += DifficultyMenuEntrySelected;
            SoundOptionsMenuEntry.Selected += SoundMenuEntrySelected;
            MusicVolumeOptionsMenuEntry.Selected += MusicVolumeMenuEntrySelected;
            MusicOptionsMenuEntry.Selected += MusicMenuEntrySelected;
            VibrationOptionsMenuEntry.Selected += VibrationMenuEntrySelected;
            backMenuEntry.Selected += OnCancel;

            // Add entries to the menu.
            //MenuEntries.Add(GameOptionsMenuEntry);
            MenuEntries.Add(SoundOptionsMenuEntry);
            MenuEntries.Add(MusicVolumeOptionsMenuEntry);
            MenuEntries.Add(MusicOptionsMenuEntry);
            MenuEntries.Add(VibrationOptionsMenuEntry);
            MenuEntries.Add(backMenuEntry);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Constructor.
        /// </summary>
        public PauseMenuScreen(ScreenManager sm)
            : base(sm,"Paused")
        {
            // Flag that there is no need for the game to transition
            // off when the pause menu is on top of it.
            IsPopup = false;

            // Create our menu entries.
            MenuEntry resumeGameMenuEntry = new MenuEntry("Resume Current Game");
            MenuEntry optionsGameMenuEntry = new MenuEntry("Options");
            MenuEntry quitGameMenuEntry = new MenuEntry("Quit to Main Menu");

            // Hook up menu event handlers.
            resumeGameMenuEntry.Selected += OnCancel;
            optionsGameMenuEntry.Selected += OptionsGameMenuEntrySelected;
            quitGameMenuEntry.Selected += QuitGameMenuEntrySelected;

            // Add entries to the menu.
            MenuEntries.Add(resumeGameMenuEntry);
            MenuEntries.Add(optionsGameMenuEntry);
            MenuEntries.Add(quitGameMenuEntry);
        }