Exemple #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();
            }
        }
Exemple #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();
            }
        }
Exemple #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();
            }
        }
Exemple #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();
            }
        }
Exemple #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();
            }
        }
Exemple #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();
            }
        }
Exemple #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();
            }
        }
Exemple #8
0
 void entry(object sender, PlayerIndexEventArgs e)
 {
     entered = true;
     entryIndex = e.PlayerIndex;
 }
Exemple #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();
        }
Exemple #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);
 }
Exemple #11
0
 private void PlayGame(object sender, PlayerIndexEventArgs e)
 {
     Game1 game = (Manager.Game as Game1);
     game.InGame = true;
     game.manager.Add(game.MakePlayer());
     ExitScreen();
 }
Exemple #12
0
 private void openCredits(object sender, PlayerIndexEventArgs e)
 {
     Manager.AddScreen(new CreditScreen(), ControllingPlayer);
 }
Exemple #13
0
 private void howtoplay(object sender, PlayerIndexEventArgs e)
 {
     Manager.AddScreen(new HowtoScreen(), ControllingPlayer);
 }
Exemple #14
0
 private void Shop(object sender, PlayerIndexEventArgs e)
 {
     Manager.AddScreen(new ShopScreen(), ControllingPlayer);
 }