Ejemplo n.º 1
0
    public void PickUpLoot(Loot loot)
    {
        if (loot.LootType.progressionAmount > 0)
        {
            AudioManager.Instance.ProgressionLoot();
            playerLoot.AddProgression(loot.LootType.progressionAmount);
            return;
        }
        else if (loot.LootType.weaponUpgrade != WeaponUpgradeTypeEnum.None)
        {
            AddWeapon(loot.LootType.weaponUpgrade, loot.LootType.upgradeDuration);
        }
        else if (loot.LootType.genericUpgrade != GenericUpgradeEnum.None)
        {
            AddGenericUpgrade(loot.LootType.genericUpgrade, loot.LootType.upgradeDuration);
        }

        if (loot.LootType.Points > 0)
        {
            GameManager.Instance.AddToScore(loot.LootType.Points);
        }

        AudioManager.Instance.UpgradeLoot();
        UIManager.Instance.SetAlert(loot.LootType);
    }