public void UpdateTurtle(TurtleUpgradeValues value, int upgradeLevel) { switch (value) { case TurtleUpgradeValues.Armor1: armorStrength += armorUpgradeAmount; break; case TurtleUpgradeValues.Armor2: break; case TurtleUpgradeValues.Armor3: break; case TurtleUpgradeValues.Movement: break; case TurtleUpgradeValues.Strength: break; case TurtleUpgradeValues.Health: currentHealth += healthUpgradeAmount; startingHealth += healthUpgradeAmount; break; case TurtleUpgradeValues.Shield: shieldStrength += shieldUpgradeAmount; break; } }
public int GetCurrentUpgradeLevel(TurtleUpgradeValues upgrade) { if (turtleUpgrades.ContainsKey(upgrade)) { return(turtleUpgrades[upgrade]); } return(0); }
public void TurnOffItem(TurtleUpgradeValues turtleUpgrade) { foreach (EquippedItems item in items) { if (item.upgradeEnum == turtleUpgrade) { item.equippedObject.SetActive(false); } } }
public bool SubtractTurtleUpgrade(TurtleUpgradeValues upgrade, int cost) { if (turtleUpgrades.ContainsKey(upgrade) && turtleUpgrades[upgrade] > 0) { turtleUpgrades[upgrade] = turtleUpgrades[upgrade] - 1; currency += cost; UpdateTurtle(upgrade, turtleUpgrades[upgrade]); return(true); } else { return(false); } }
public bool AddTurtleUpgrade(TurtleUpgradeValues upgrade, int cost) { if (currency < cost) { return(false); } if (turtleUpgrades.ContainsKey(upgrade)) { turtleUpgrades[upgrade] = turtleUpgrades[upgrade] + 1; } else { turtleUpgrades.Add(upgrade, 1); } currency -= cost; UpdateTurtle(upgrade, turtleUpgrades[upgrade]); Debug.Log("Upgraded Turtle"); return(true); }
public void UpdateTurtle(TurtleUpgradeValues upgrade, int level) { turtle.UpdateTurtle(upgrade, level); }