Esempio n. 1
0
        public void Reset()
        {
            if (transform == null)
            {
                return;
            }

            foreach (Transform child in transform)
            {
                BuildingInfo info = child.gameObject.GetComponent <BuildingInfo>();

                if (info != null)
                {
                    info.DestroyPrefab();
                }

                GameObject.Destroy(child.gameObject);
            }

            variationToBase.Clear();
        }
Esempio n. 2
0
 void DestroyBuilding(BuildingInfo info)
 {
     info.DestroyPrefabInstance();
     info.DestroyPrefab();
 }