Upgrade with keyboard

This commit is contained in:
Sveske_Juice 2024-02-06 14:53:30 +01:00
parent c55784ac08
commit b2c4949b4d
2 changed files with 1146 additions and 8 deletions

File diff suppressed because it is too large Load Diff

View File

@ -115,6 +115,62 @@ public class Upgrader : MonoBehaviour
if (canUpgrade())
{
//keyboard upgrade
if (Input.GetKeyUp(KeyCode.Alpha1))
{
bloodManager.score -= upgradeCost;
upgradeCost = (int)(upgradeCost * 1.2f);
UpgradeMopSize();
}
else if (Input.GetKeyUp(KeyCode.Alpha2))
{
bloodManager.score -= upgradeCost;
upgradeCost = (int)(upgradeCost * 1.2f);
UpgradeSpeed();
}
else if (Input.GetKeyUp(KeyCode.Alpha3))
{
bloodManager.score -= upgradeCost;
upgradeCost = (int)(upgradeCost * 1.2f);
RopeUpgrade();
}
else if (Input.GetKeyUp(KeyCode.Alpha4))
{
bloodManager.score -= upgradeCost;
upgradeCost = (int)(upgradeCost * 1.2f);
HealthUpgrade();
}
else if (Input.GetKeyUp(KeyCode.Alpha5))
{
bloodManager.score -= upgradeCost;
upgradeCost = (int)(upgradeCost * 1.2f);
DamageUpgrade();
}
else if (Input.GetKeyUp(KeyCode.Alpha6))
{
bloodManager.score -= upgradeCost;
upgradeCost = (int)(upgradeCost * 1.2f);
BloodUpgrade();
}
else if (Input.GetKeyUp(KeyCode.Alpha7))
{
bloodManager.score -= upgradeCost;
upgradeCost = (int)(upgradeCost * 1.2f);
ReelUpgrade();
}
else if (Input.GetKeyUp(KeyCode.Alpha8))
{
ReviveUpgrade();
bloodManager.score -= upgradeCost;
upgradeCost = (int)(upgradeCost * 1.2f);
}
if (!prevCouldUpgrade)
{