// public override string GetHealthText () // { // if (constructing) // { // return "Constructing"; // } // return base.GetHealthText (); // } public override void Die() { if (isAlive && this as StrategicPoint == null) { if (player) { player.buildings.RemoveBuilding(this); } ResourceType[] resourceArray = BuildMenu.buildingCostDick [name].Keys.ToArray(); foreach (ResourceType resource in resourceArray) { BuildMenu.buildingCostDick[name][resource] = BuildMenu.buildingCostDick[name][resource] / multiBuildingExp; } BuildingMenuPanel.ChangeCostText(name); } base.Die(); if (buildingSlot) { buildingSlot.SetOccupation(false); } if (!destroyingGameObject && this as StrategicPoint == null) { StartDestroyGameObject(); } }
private BuildingSlot SetBuildingSlot() { currBuildingSlot.SetOccupation(true); return(currBuildingSlot); }