Exemplo n.º 1
0
        void PickupWeapon(PlayerShip pShip, eEnemyGunType gunType)
        {
            BaseGun wpn = pShip.GetGun(gunType);

            if (wpn != null)
            {
                if (wpn.CanUpgradeTier)
                {
                    wpn.UpgradeTier();
                    pShip.UpdateAquiredGuns(); // This is needed to set the background box from green to purple.
                }
                else
                {
                    pShip.Heal(DOUBLE_PICKUP_HEAL_AMOUNT);
                }
            }
            else
            {
                pShip.AddGun(gunType);
            }
        }