Beispiel #1
0
        public ShopScreen()
            : base("Shop")
        {
            healthUpgrade = new MenuEntry("");
            airUpgrade = new MenuEntry("");
            speedUpgrade = new MenuEntry("");
            bulletHits = new MenuEntry("");
            bulletDamage = new MenuEntry("");
            bulletSpeed = new MenuEntry("");
            shotTime = new MenuEntry("");

            restartEntry = new MenuEntry("Start Over");

            healthUpgrade.Selected += upgradeHealth;
            airUpgrade.Selected += upgradeAir;
            speedUpgrade.Selected += upgradeSpeed;
            bulletHits.Selected += upgradeHits;
            bulletDamage.Selected += upgradeDamage;
            bulletSpeed.Selected += upgradeBulletSpeed;
            shotTime.Selected += upgradeShotTime;

            restartEntry.Selected += startOver;

            SelectionChangeSound = "Select";
            SelectionSound = "Select";
            CancelSound = "Select";
        }
Beispiel #2
0
        public MainMenuScreen(string text)
            : base(text)
        {
            //Add menu entries
            MenuEntry playGame = new MenuEntry("Play Game");
            MenuEntry shop = new MenuEntry("Shop");
            MenuEntry howtoPlay = new MenuEntry("How to Play");
            MenuEntry credits = new MenuEntry("Credits");
            MenuEntry exitGame = new MenuEntry("Exit Game");

            playGame.Selected += new EventHandler<PlayerIndexEventArgs>(PlayGame);
            shop.Selected += new EventHandler<PlayerIndexEventArgs>(Shop);
            howtoPlay.Selected += howtoplay;
            credits.Selected += openCredits;
            exitGame.Selected += OnCancel;

            MenuEntries.Add(playGame);
            MenuEntries.Add(shop);
            MenuEntries.Add(howtoPlay);
            MenuEntries.Add(credits);
            MenuEntries.Add(exitGame);

            SelectionChangeSound = "Select";
            SelectionSound = "Select";
        }