예제 #1
0
        public ShopScreen(Game game)
            : base("Shop")
        {
            viewportRect = new Rectangle(0, 0, game.GraphicsDevice.Viewport.Width,
                                                         game.GraphicsDevice.Viewport.Height);

            IsPopup = true;
            weaponUpgraded = false;
            shieldUpgraded = false;
            engineUpgraded = false;
            // Create our menu entries.
            MenuEntry upgradeWeaponMenuEntry = new MenuEntry("Upgrade Weapon, Cost: Score -500");
            MenuEntry upgradeShieldMenuEntry = new MenuEntry("Upgrade Shield, Cost: Score -1000");
            MenuEntry upgradeEngineMenuEntry = new MenuEntry("Upgrade Engine, Cost: Score -700");
            MenuEntry resumeGameMenuEntry = new MenuEntry("Resume Game");

            upgradeWeaponMenuEntry.Selected += UpgradeWeaponMenuEntrySelected;
            upgradeShieldMenuEntry.Selected += UpgradeShieldMenuEntrySelected;
            upgradeEngineMenuEntry.Selected += UpgradeEngineMenuEntrySelected;
            resumeGameMenuEntry.Selected += OnCancel;

            // Add entries to the menu.
            MenuEntries.Add(upgradeWeaponMenuEntry);
            MenuEntries.Add(upgradeShieldMenuEntry);
            MenuEntries.Add(upgradeEngineMenuEntry);
            MenuEntries.Add(resumeGameMenuEntry);
        }
예제 #2
0
        public PlayerDeadScreen(Game game, TimeSpan timer)
            : base("No more lives remaining!")
        {
            this.game = game;
            IsPopup = true;
            // Create our menu entries.
            MenuEntry trollMenuEntry = new MenuEntry("TrollMode");
            MenuEntry okayMenuEntry = new MenuEntry("Okay");

            trollMenuEntry.Selected += trollMenuEntrySelected;
            okayMenuEntry.Selected += OkayMenuEntrySelected;

            // Add entries to the menu.
            MenuEntries.Add(trollMenuEntry);
            MenuEntries.Add(okayMenuEntry);

            //draw variable

            //if (content == null)
            //    content = new ContentManager(ScreenManager.Game.Services, "Content");
            font = game.Content.Load<SpriteFont>("Fonts\\GameFont");
            //font = ScreenManager.Game.Content.Load<SpriteFont>("Fonts\\GameFont");
            viewportRect = new Rectangle(0, 0, game.GraphicsDevice.Viewport.Width,
                                                         game.GraphicsDevice.Viewport.Height);

            //HighScore Values
            time = timer;
            score = Player.ScoreSystem.TotalScore;
            name = Player.SaveGameData.playerName;
            saveData = new SaveGameData(time, score, name);
            oldData = new SaveGameData(new TimeSpan(), 0, "Aero");
            //#if XBOX
            StorageDevice.BeginShowSelector(PlayerIndex.One, this.GetDevice, (object)"GetDevice for Player One");
            //#endif
        }
예제 #3
0
        public PauseScreen(Game game)
            : base("Pause")
        {
            this.game = game;
            IsPopup = true;
            // Create our menu entries.
            MenuEntry resumeGameMenuEntry = new MenuEntry("Resume Game");
            MenuEntry quitGameMenuEntry = new MenuEntry("Quit Game");

            resumeGameMenuEntry.Selected += OnCancel;
            quitGameMenuEntry.Selected += QuitGameMenuEntrySelected;

            // Add entries to the menu.
            MenuEntries.Add(resumeGameMenuEntry);
            MenuEntries.Add(quitGameMenuEntry);
        }
예제 #4
0
        public GameOverScreen(Game game)
            : base("GAME OVER")
        {
            this.game = game;
            MenuEntry trollModeMenuEntry = new MenuEntry("Troll Mode");
            MenuEntry titleReturnMenuEntry = new MenuEntry("Return to Title Screen");
            MenuEntry exitGameMenuEntry = new MenuEntry("Exit Game");

            trollModeMenuEntry.Selected += trollModeEntrySelected;
            titleReturnMenuEntry.Selected += titleReturnMenuEntrySelected;
            exitGameMenuEntry.Selected += OnCancel;

            MenuEntries.Add(titleReturnMenuEntry);
            MenuEntries.Add(exitGameMenuEntry);

            TransitionOnTime = TimeSpan.FromSeconds(0.5);
            TransitionOffTime = TimeSpan.FromSeconds(0.5);
        }
예제 #5
0
        public NameInputScreen(Game game)
            : base("Input Name")
        {
            this.game = game;
            IsPopup = true;
            // Create our menu entries.
            name = Player.SaveGameData.playerName;
            //letter = 65;//A
            MenuEntry nameEntry = new MenuEntry(name);
            MenuEntry resumeGameMenuEntry = new MenuEntry("Resume Game");
            MenuEntry quitGameMenuEntry = new MenuEntry("Quit Game");

            resumeGameMenuEntry.Selected += OnCancel;
            quitGameMenuEntry.Selected += QuitGameMenuEntrySelected;

            // Add entries to the menu.
            MenuEntries.Add(resumeGameMenuEntry);
            MenuEntries.Add(quitGameMenuEntry);
        }
예제 #6
0
        public TitleScreen(Game game)
            : base("")
        {
            this.game = game;
            //if (content == null)
            //    content = new ContentManager(ScreenManager.Game.Services, "Content");
            if (AeroGame.lagTest)
                texture = AeroGame.LoadTextureStream("AeroTitleCross");
            else
                texture = AeroGame.ContentManager.Load<Texture2D>("Textures\\AeroTitleCross");
            textureData = new Color[texture.Width * texture.Height];
            texture.GetData(textureData);

            MenuEntry startGameMenuEntry = new MenuEntry("Start Game");
            MenuEntry exitGameMenuEntry = new MenuEntry("Exit Game");
            MenuEntry controlsMenuEntry = new MenuEntry("Controls");

            startGameMenuEntry.Selected += StartGameMenuEntrySelected;
            controlsMenuEntry.Selected += ControlsMenuEntrySelected;
            exitGameMenuEntry.Selected += OnCancel;

            MenuEntries.Add(startGameMenuEntry);
            MenuEntries.Add(controlsMenuEntry);
            MenuEntries.Add(exitGameMenuEntry);

            //this.game = game;

            //graphicsService = (IGraphicsDeviceService)game.Services.GetService(typeof(IGraphicsDeviceService));
            //device = graphicsService.GraphicsDevice;
            //spriteBatch = new SpriteBatch(graphicsService.GraphicsDevice);
            //ScreenManager.Initialize();
            //SpriteBatch spriteBatch = ScreenManager.SpriteBatch;

            //viewportRect = new Rectangle(0, 0, AeroGame.Graphics.GraphicsDevice.Viewport.Width,
            //                                             AeroGame.Graphics.GraphicsDevice.Viewport.Height);
            //backgroundTexture = game.Content.Load<Texture2D>("Textures\\AeroTitleBackground");

            TransitionOnTime = TimeSpan.FromSeconds(0.5);
            TransitionOffTime = TimeSpan.FromSeconds(0.5);

            hintSystem = new HintSystem();
        }