void Start() { //assemble station structure dictionary StructureList structureList = GameObject.Find("_Lists").GetComponent<StructureList>(); List<StationStructure> upgrades = structureList.GetAllStationUpgrades(); for (int i = 0; i < upgrades.Count; i++) { StationStructure newStructure = new StationStructure(); newStructure.CopyData(upgrades[i]); stationStructures.Add(newStructure.ID, newStructure); } _money = 1000; StartNewTurn(); }
//returns true if upgrade was bought public bool BuyUpgrade(StationStructure upgrade) { if (!upgrade.isBuilt && buy(upgrade.cost)) { StationStructure newUpgrade = new StationStructure(); newUpgrade.CopyData(upgrade); buildQueue.Add(newUpgrade); return true; } return false; }