// Buying shii...uff public void BuyingUpgrade(TechTreeButton _tech) { if (_tech.cost <= currentNutrients) { currentNutrients -= _tech.cost; } }
public void BuyingSunUpgrade(TechTreeButton _tech) { if (_tech.cost <= currentNutrients) { currentNutrients -= _tech.cost; _tech.cost += 20; maxSunlight += 100; sunlightBar.maxValue += 100; if (sunUpgrades >= 5) { _tech.gameObject.SetActive(false); } sunUpgrades += 1; } }
public void BuyingNutUpgrade(TechTreeButton _tech) { if (_tech.cost <= currentNutrients) { currentNutrients -= _tech.cost; _tech.cost += 20; maxNutrients += 100; nutrientsBar.maxValue += 100; if (nutUpgrades >= 5) { _tech.gameObject.SetActive(false); } nutUpgrades += 1; } }
public void BuyingTechUpgrade(TechTreeButton _tech) { if (_tech.cost <= currentNutrients) { currentNutrients -= _tech.cost; FindObjectOfType <Roots>().tech += 1; _tech.cost += 20; if (spriteIterator < drills.Length) { _tech.gameObject.GetComponent <Image>().sprite = drills[spriteIterator++]; } else { _tech.gameObject.SetActive(false); } } }
public void BuyingLunarLeaf(TechTreeButton _tech) { if (_tech.cost <= currentNutrients) { currentNutrients -= _tech.cost; leavesGO[LunarLeafCount].GetComponent <LookAtSun>().m_lunar = true; _tech.cost += 20; if (LunarLeafCount < 4) { LunarLeafCount += 1; } else { _tech.gameObject.SetActive(false); } } }
public void BuyingRotationUpgrade(TechTreeButton _tech) { if (_tech.cost <= currentNutrients) { currentNutrients -= _tech.cost; _tech.cost += 20; for (int i = 0; i < 5; i++) { leavesGO[i].GetComponent <LookAtSun>().m_speed += 1.0f; } if (leafSpeed >= 5) { _tech.gameObject.SetActive(false); } leafSpeed += 1; } }
public void BuyingLeaf(TechTreeButton _tech) { if (_tech.cost <= currentNutrients) { currentNutrients -= _tech.cost; if (leafCount < 4) { leavesGO[leafCount].SetActive(true); //Debug.Log("BSBHSBHSVHVS"); _tech.cost += 20; leafCount++; //_tech.NoOfRebuys -= 1; } else { _tech.gameObject.SetActive(false); } } //Max leaves is 5 }