예제 #1
0
        private void GivePlayerItem(IPlayer player)
        {
            switch (desc.NameValue.ToUpper())
            {
            case "HEALTH":
                ((Player2)player).AddHealth(desc.Value);
                Intercom.GiveHealth();
                break;

            case "SHIELD":
                ((Player2)player).AddShield(desc.Value);
                Intercom.GiveShield();
                break;

            case "EXTRALIFE":       //TODO: Implement ExtraLive!
                game.Sounds.CreateSound("ExtraLife").Play();
                ((Player2)player).Lifes++;
                Intercom.GiveExtraLife();
                break;

            case "FUEL":
                ((Player2)player).Fuel += desc.Value;
                Intercom.GiveFuel();
                break;

            default:
                break;
            }
        }