Tweaked upgrade prices and fixed horrendous Upgrader.cs keyboard port 💀

This commit is contained in:
SpoodyTheOne 2024-02-09 09:23:58 +01:00
parent 59415a34c0
commit 2a497e709b
2 changed files with 54 additions and 56 deletions

View File

@ -4156,10 +4156,30 @@ PrefabInstance:
propertyPath: bloodManager propertyPath: bloodManager
value: value:
objectReference: {fileID: 640312359} objectReference: {fileID: 640312359}
- target: {fileID: 2458716502903188221, guid: 48e0e53445d42474895d37a321c39d1c, type: 3}
propertyPath: reelIncrease
value: 1.2
objectReference: {fileID: 0}
- target: {fileID: 2458716502903188221, guid: 48e0e53445d42474895d37a321c39d1c, type: 3} - target: {fileID: 2458716502903188221, guid: 48e0e53445d42474895d37a321c39d1c, type: 3}
propertyPath: ropeIncrease propertyPath: ropeIncrease
value: 1.1 value: 1.1
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 2458716502903188221, guid: 48e0e53445d42474895d37a321c39d1c, type: 3}
propertyPath: bloodIncrease
value: 1.15
objectReference: {fileID: 0}
- target: {fileID: 2458716502903188221, guid: 48e0e53445d42474895d37a321c39d1c, type: 3}
propertyPath: damageIncrease
value: 1.5
objectReference: {fileID: 0}
- target: {fileID: 2458716502903188221, guid: 48e0e53445d42474895d37a321c39d1c, type: 3}
propertyPath: healthIncrease
value: 1.25
objectReference: {fileID: 0}
- target: {fileID: 2458716502903188221, guid: 48e0e53445d42474895d37a321c39d1c, type: 3}
propertyPath: mopSizeIncrease
value: 1.5
objectReference: {fileID: 0}
- target: {fileID: 2603779566095873902, guid: 48e0e53445d42474895d37a321c39d1c, type: 3} - target: {fileID: 2603779566095873902, guid: 48e0e53445d42474895d37a321c39d1c, type: 3}
propertyPath: m_Pivot.x propertyPath: m_Pivot.x
value: 0 value: 0

View File

@ -115,62 +115,6 @@ public class Upgrader : MonoBehaviour
if (canUpgrade()) 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) if (!prevCouldUpgrade)
{ {
@ -187,6 +131,40 @@ public class Upgrader : MonoBehaviour
int p1a = getRegion(Player1Input.look.x, Player1Input.look.y, 8); int p1a = getRegion(Player1Input.look.x, Player1Input.look.y, 8);
int p2a = getRegion(Player2Input.look.x, Player2Input.look.y, 8); int p2a = getRegion(Player2Input.look.x, Player2Input.look.y, 8);
//keyboard upgrade
if (Input.GetKey(KeyCode.Alpha1))
{
p1a = p2a = 0;
}
else if (Input.GetKey(KeyCode.Alpha2))
{
p1a = p2a = 1;
}
else if (Input.GetKey(KeyCode.Alpha3))
{
p1a = p2a = 2;
}
else if (Input.GetKey(KeyCode.Alpha4))
{
p1a = p2a = 3;
}
else if (Input.GetKey(KeyCode.Alpha5))
{
p1a = p2a = 4;
}
else if (Input.GetKey(KeyCode.Alpha6))
{
p1a = p2a = 5;
}
else if (Input.GetKey(KeyCode.Alpha7))
{
p1a = p2a = 6;
}
else if (Input.GetKey(KeyCode.Alpha8))
{
p1a = p2a = 7;
}
if (p1a != -1 && p2a == p1a) if (p1a != -1 && p2a == p1a)
{ {
if (acceptTime > 2f) if (acceptTime > 2f)