void UpdateManagerVariables() { balance = economyManager.GetBalance(); income = economyManager.GetIncome(); population = economyManager.GetPopulation(); happiness = happinessManager.happiness; }
public void EnableBuilding() // Call this to spawn the building { if (!disablePurchase && economyManager.GetBalance() > price && containedBuilding) { economyManager.MakePurchase(price); SizeForPlay(); DeselectBuilding(); if (containedBuilding.tag == "industrial" || containedBuilding.tag == "industrialComponent") // Smoke deactivation { foreach (Transform child in containedBuilding.transform) { child.gameObject.SetActive(true); } } else if (containedBuilding.tag == "service") { serv.AddService(); } EnablePhysics(); if (containedType == 0) { EnableResidential(); } else if (containedType == 1) { EnableCommercial(); } else if (containedType == 2) { EnableIndustrial(); } else if (containedType == 3) { EnableCommercial(); } else if (containedType == 4) { EnableComponent(); } else if (containedType == 5) { EnableFoliage(); } else if (containedType == 6) { EnableService(); } // Spawns new from here!!!!! showingBuilding = false; spawnManager.SpawnUIBuildings(displayUI.GetSelection(), thumb.angleIncrement); } else { economyManager.FailedPurchase(); } }