Beispiel #1
0
        void upgradeSpeed(object sender, PlayerIndexEventArgs e)
        {
            if (theGame.coins >= theGame.speedCost)
            {
                theGame.speed += 50;
                theGame.coins -= theGame.speedCost;

                theGame.speedCost += theGame.speedCost / 2;

                if (theGame.speed >= theGame.maxSpeed)
                    MenuEntries.Remove(speedUpgrade);

                updateText();
            }
        }
Beispiel #2
0
        void upgradeHits(object sender, PlayerIndexEventArgs e)
        {
            if (theGame.coins >= theGame.hitsCost)
            {
                theGame.bulletHits += 1;
                theGame.coins -= theGame.hitsCost;

                theGame.hitsCost += theGame.hitsCost / 2;

                if (theGame.bulletHits >= theGame.maxBulletHits)
                    MenuEntries.Remove(bulletHits);

                updateText();
            }
        }
Beispiel #3
0
        void upgradeShotTime(object sender, PlayerIndexEventArgs e)
        {
            if (theGame.coins >= theGame.shotTimeCost)
            {
                theGame.shotTime -= 0.05f;
                theGame.coins -= theGame.shotTimeCost;

                theGame.shotTimeCost += theGame.shotTimeCost / 2;

                if (theGame.shotTime <= theGame.minShotTime)
                    MenuEntries.Remove(shotTime);

                updateText();
            }
        }
Beispiel #4
0
        void upgradeDamage(object sender, PlayerIndexEventArgs e)
        {
            if (theGame.coins >= theGame.damageCost)
            {
                theGame.bulletDamage += 1;
                theGame.coins -= theGame.damageCost;

                theGame.damageCost += theGame.damageCost / 2;

                if (theGame.bulletDamage >= theGame.maxBulletDamage)
                    MenuEntries.Remove(bulletDamage);

                updateText();
            }
        }
Beispiel #5
0
        void upgradeHealth(object sender, PlayerIndexEventArgs e)
        {
            if (theGame.coins >= theGame.healthCost)
            {
                theGame.health += 2;
                theGame.coins -= theGame.healthCost;

                theGame.healthCost += theGame.healthCost / 2;

                if (theGame.health >= theGame.maxHealth)
                    MenuEntries.Remove(healthUpgrade);

                updateText();
            }
        }
Beispiel #6
0
        void upgradeAir(object sender, PlayerIndexEventArgs e)
        {
            if (theGame.coins >= theGame.airCost)
            {
                theGame.air += 10;
                theGame.coins -= theGame.airCost;

                theGame.airCost += theGame.airCost / 2;

                if (theGame.air >= theGame.maxAir)
                    MenuEntries.Remove(airUpgrade);

                updateText();
            }
        }
Beispiel #7
0
        void upgradeBulletSpeed(object sender, PlayerIndexEventArgs e)
        {
            if (theGame.coins >= theGame.bulletSpeedCost)
            {
                theGame.bulletSpeed += 50f;
                theGame.coins -= theGame.bulletSpeedCost;

                theGame.bulletSpeedCost += theGame.bulletSpeedCost / 2;

                if (theGame.bulletSpeed >= theGame.maxBulletSpeed)
                    MenuEntries.Remove(bulletSpeed);

                updateText();
            }
        }
Beispiel #8
0
 void entry(object sender, PlayerIndexEventArgs e)
 {
     entered = true;
     entryIndex = e.PlayerIndex;
 }
Beispiel #9
0
        void startOver(object sender, PlayerIndexEventArgs e)
        {
            #if WINDOWS
            theGame.InitialSave();

            theGame.ReadSave();
            #endif

            #if XBOX
            StorageContainer c = ScreenManager.GetContainer();

            theGame.InitializeXbox(c);

            c.Dispose();
            #endif

            updateText();
        }
Beispiel #10
0
 /// <summary>
 /// Helper overload makes it easy to use OnCancel as a MenuEntry event handler.
 /// </summary>
 protected void OnCancel(object sender, PlayerIndexEventArgs e)
 {
     OnCancel(e.PlayerIndex);
 }
Beispiel #11
0
 private void PlayGame(object sender, PlayerIndexEventArgs e)
 {
     Game1 game = (Manager.Game as Game1);
     game.InGame = true;
     game.manager.Add(game.MakePlayer());
     ExitScreen();
 }
Beispiel #12
0
 private void openCredits(object sender, PlayerIndexEventArgs e)
 {
     Manager.AddScreen(new CreditScreen(), ControllingPlayer);
 }
Beispiel #13
0
 private void howtoplay(object sender, PlayerIndexEventArgs e)
 {
     Manager.AddScreen(new HowtoScreen(), ControllingPlayer);
 }
Beispiel #14
0
 private void Shop(object sender, PlayerIndexEventArgs e)
 {
     Manager.AddScreen(new ShopScreen(), ControllingPlayer);
 }