public SuperXbloxGame() { Content.RootDirectory = "Content"; graphics = new GraphicsDeviceManager(this); graphics.PreparingDeviceSettings += new EventHandler<PreparingDeviceSettingsEventArgs>(graphics_PreparingDeviceSettings); mSound = new Sound(this); particleManager = new ParticleManager(this); screenManager = new ScreenManager(this); reticule = new Reticule(this); reticule2 = new Reticule(this); Components.Add(mSound);//0 Components.Add(screenManager);//1 Components.Add(particleManager);//2 //Components.Add(reticule); //3 //Components.Add(reticule2); //4 //Storage.LoadSettings(); //Components.Add(smokePlume); //BEGIN Xbox Live Test Components.Add(new GamerServicesComponent(this));//5 //END Xbox Live TEST }
/// <summary> /// Constructor. /// </summary> public MenuScreen(ScreenManager sm,string menuTitle) : base(sm) { this.menuTitle = menuTitle; TransitionOnTime = TimeSpan.FromSeconds(0.5); TransitionOffTime = TimeSpan.FromSeconds(0.5); }
/// <summary> /// The constructor is private: loading screens should /// be activated via the static Load method instead. /// </summary> private LoadingScreen(ScreenManager screenManager, bool loadingIsSlow, GameScreen[] screensToLoad) : base(screenManager) { this.loadingIsSlow = loadingIsSlow; this.screensToLoad = screensToLoad; TransitionOnTime = TimeSpan.FromSeconds(0.5); }
/// <summary> /// Constructor. /// </summary> public MainMenuScreen(ScreenManager sm) : base(sm) { menuTitle = "Main Menu"; menuEntries[0].text="Play"; menuEntries[1].text = "Options"; menuEntries[2].text = "Credits"; menuEntries[3].text = "Return to Arcade"; menuEntries[4].text = "Unlock Full Version"; TransitionOnTime = TimeSpan.FromSeconds(0.5); TransitionOffTime = TimeSpan.FromSeconds(0.5); }
/// <summary> /// Activates the loading screen. /// </summary> public static void Load(ScreenManager screenManager, bool loadingIsSlow, PlayerIndex? controllingPlayer, params GameScreen[] screensToLoad) { // Tell all the current screens to transition off. foreach (GameScreen screen in screenManager.GetScreens()) screen.ExitScreen(); // Create and activate the loading screen. LoadingScreen loadingScreen = new LoadingScreen(screenManager, loadingIsSlow, screensToLoad); screenManager.AddScreen(loadingScreen, controllingPlayer); }
/// <summary> /// Constructor. /// </summary> public CreditsScreen(ScreenManager sm) : base(sm) { // Flag that there is no need for the game to transition // off when the pause menu is on top of it. IsPopup = true; // Create our menu entries. //MenuEntry highscores = new MenuEntry("HIGH SCORES"); //MenuEntry quitGameMenuEntry = new MenuEntry(""); // Hook up menu event handlers. //quitGameMenuEntry.Selected += QuitGameMenuEntrySelected; //MenuEntries.Add(quitGameMenuEntry); test this }
/// <summary> /// Constructor lets the caller specify whether to include the standard /// "A=ok, B=cancel" usage text prompt. /// </summary> public MessageBoxScreen(ScreenManager sm,string message, bool includeUsageText) : base(sm) { //const string usageText = "\n = Yes" + // "\n = No"; //if (includeUsageText) // this.message = message + usageText; //else this.message = message; IsPopup = true; TransitionOnTime = TimeSpan.FromSeconds(0.2); TransitionOffTime = TimeSpan.FromSeconds(0.2); }
//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); } }
/// <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); }
/// <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); }
public GameScreen(ScreenManager SM) { // mSound = (Sound)ScreenManager.Game.Components[4]; screenManager = SM; }
/// <summary> /// Constructor. /// </summary> public BattleMode(ScreenManager sm,PlayerIndex player1,PlayerIndex player2) : base(sm) { player1_index = player1; player2_index = player2; TransitionOnTime = TimeSpan.FromSeconds(1.5); TransitionOffTime = TimeSpan.FromSeconds(0.5); }
/// <summary> /// Constructor automatically includes the standard "A=ok, B=cancel" /// usage text prompt. /// </summary> public MessageBoxScreen(ScreenManager sm, string message) : this(sm,message, true) { }
/// <summary> /// Only method needed to be able to test boring mode with a keyboard /// </summary> /// public /// public ComboMode(ScreenManager sm) : base(sm) { //' base.bo }
/// <summary> /// Only method needed to be able to test boring mode with a keyboard /// </summary> /// public /// public Particle_Keyboard(ScreenManager sm) : base(sm) { //' base.bo }
/// <summary> /// Constructor. /// </summary> public TitleBackground(ScreenManager sm) : base(sm) { TransitionOnTime = TimeSpan.FromSeconds(0.5); TransitionOffTime = TimeSpan.FromSeconds(0.5); }
/// <summary> /// Constructor. /// </summary> public PlayMenuScreen(ScreenManager sm) : base(sm) { Storage.themode = Storage.mode.SinglePlayer; Storage.Score = 0; //Storage.vibration = 0; //Storage.sound = 30; //Storage.music = 30; //Storage.SaveHighScores(); //selectedtext = "Single Player"; menuTitle = "Choose your mode"; //PlayMenuEntry ParticleEntry = new PlayMenuEntry(); //ParticleEntry.text = "Single Player"; //ParticleEntry.description = "This is a single player game. Move the falling blocks to complete horizontal lines."; //ParticleEntry.highscore = "";//Storage.gethighs()[0].ToString(); //ParticleEntry.players = "1"; //menuEntries.AddLast(ParticleEntry); //PlayMenuEntry ParticleKeyboardEntry = new PlayMenuEntry(); //ParticleKeyboardEntry.text = "Single Player Keyboard"; //ParticleKeyboardEntry.description = "Single player but with keyboard functioning"; //ParticleKeyboardEntry.highscore = ""; //Storage.gethighs()[0].ToString(); //ParticleKeyboardEntry.players = "1"; //menuEntries.AddLast(ParticleKeyboardEntry); //PlayMenuEntry SinglePlayerEntry = new PlayMenuEntry(); //SinglePlayerEntry.text = "Single Player (Old)"; //SinglePlayerEntry.description = "This is the old single player game."; //SinglePlayerEntry.highscore = "";// Storage.gethighs()[0].ToString(); //SinglePlayerEntry.players = "1"; //menuEntries.AddLast(SinglePlayerEntry); //PlayMenuEntry BattleEntry = new PlayMenuEntry(); //BattleEntry.text = "Battle"; //BattleEntry.description = " This is a 2 player mode inwhich each player tries to cause the other to loose by using set attacks to cause their playfield to overflow. Move the falling blocks to complete horizontal lines."; //BattleEntry.highscore = "";//Storage.gethighs()[2].ToString(); //BattleEntry.players = "2"; //menuEntries.AddLast(BattleEntry); //PlayMenuEntry BasicEntry = new PlayMenuEntry(); //BasicEntry.text = "Basic"; //BasicEntry.description = " This is puzzle mode suports up to 4 players. No graity, no linked pieces. Very easy difficulty. Move the falling blocks to complete horizontal lines."; //BasicEntry.highscore = "";// Storage.gethighs()[1].ToString(); //BasicEntry.players = "1-4"; //menuEntries.AddLast(BasicEntry); //PlayMenuEntry BasicKeyboardEntry = new PlayMenuEntry(); //BasicKeyboardEntry.text = "Basic Keyboard test"; //BasicKeyboardEntry.description = "Basic mode with the keyboard enabled as the input "; //BasicKeyboardEntry.highscore = "";// Storage.gethighs()[1].ToString(); //BasicKeyboardEntry.players = "1"; //menuEntries.AddLast(BasicKeyboardEntry); //PlayMenuEntry ComboEntry = new PlayMenuEntry(); //ComboEntry.text = "Combo"; //ComboEntry.description = "Combo Mode description goes here "; //ComboEntry.highscore = "";// Storage.gethighs()[3].ToString(); //ComboEntry.players = "1-4"; //menuEntries.AddLast(ComboEntry); TransitionOnTime = TimeSpan.FromSeconds(0.5); TransitionOffTime = TimeSpan.FromSeconds(0.5); }
/// <summary> /// Constructor. /// </summary> public ParticleScreen(ScreenManager sm) : base(sm) { TransitionOnTime = TimeSpan.FromSeconds(1.5); TransitionOffTime = TimeSpan.FromSeconds(0.5); }
/// <summary> /// Only method needed to be able to test boring mode with a keyboard /// </summary> /// public /// public BoringGameScreenwithkeyboard(ScreenManager sm) : base(sm) { }
/// <summary> /// Constructor. /// </summary> public GameplayScreen(ScreenManager sm) : base(sm) { TransitionOnTime = TimeSpan.FromSeconds(1.5); TransitionOffTime = TimeSpan.FromSeconds(0.5); // mSound = (Sound)ScreenManager.Game.Components[4]; mCurrentShape = new Shape(mPlayfield, true, true); mNextShape = new Shape(mPlayfield, true, true); mNextShape.DrawPositionX = 400; mNextShape.DrawPositionY = 10; }