Exemplo n.º 1
0
        private void GiveStuff(IPlayer player)
        {
            if (player is Player2)
            {
                switch (desc.ItemType.ToUpper())
                {
                case "WEAPON":
                    GiveWeapon(player);
                    Intercom.GiveWeapon();
                    break;

                case "AMMO":
                    GiveAmmo(player);
                    Intercom.GiveAmmo();
                    break;

                case "PLAYER":
                    GivePlayerItem(player);
                    break;

                default:
                    break;
                }
            }
            game.GameStates.Hud.DisplayScrollingText(desc.ItemType.ToUpper() + System.Environment.NewLine + desc.NameValue, time);
            ISound powerup = game.Sounds.CreateSound("Ammo");

            powerup.Play();
            game.World.RemoveObject(this);
            this.Dispose();
        }