public void BuyShield() { if (playerRef.SafeBuy(cost)) { playerHealth.HasShield = true; } }
public void BuyJetpack() { if (playerRef.SafeBuy(cost)) { playerJetpack.hasJetpack = true; } }
public void BuyWeapon(Weapon weaponToBuy) { switch (weaponToBuy) { case Weapon.Pistol: { Debug.LogError("Se intento comprar pistol"); break; } case Weapon.Shotgun: { if (playerMoney.SafeBuy(shotgun_cost)) { shotgun_unlocked = true; SavePrefs(); } break; } case Weapon.BurstRifle: { if (playerMoney.SafeBuy(rifle_cost)) { rifle_unlocked = true; SavePrefs(); } break; } case Weapon.RocketLauncher: { if (playerMoney.SafeBuy(rpg_cost)) { rpg_unlocked = true; SavePrefs(); } break; } } }