public void Upgrade(PlayerWithJoystick.AttributeType attribute) { if (CanUpgrade(attribute)) { coins -= costHolder.GetNextLevelCost(attribute); attributes[(int)attribute]++; } }
public int GetNextLevelCost(PlayerWithJoystick.AttributeType attribute) { if (GameManager.I.attributes[(int)attribute] + 1 >= costsByUpgradeLevel.Length) { return(0); } else { return(costsByUpgradeLevel[GameManager.I.attributes[(int)attribute] + 1]); } //return 1; }
public bool CanUpgrade(PlayerWithJoystick.AttributeType attribute) { return(attributes[(int)attribute] < costHolder.maxLevels - 1 && coins >= costHolder.GetNextLevelCost(attribute)); }
public float GetStatAsMultiplier(PlayerWithJoystick.AttributeType attribute) { return(values[(int)attribute][GameManager.I.attributes[(int)attribute]] / 100f); }
public int GetStatAsValue(PlayerWithJoystick.AttributeType attribute) { return(values[(int)attribute][GameManager.I.attributes[(int)attribute]]); }