Beispiel #1
0
//	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();
        }
    }
Beispiel #2
0
 private BuildingSlot SetBuildingSlot()
 {
     currBuildingSlot.SetOccupation(true);
     return(currBuildingSlot);
 }