3DTD/Assets/Scripts/Utilities/TowerDeleter.cs

11 lines
227 B
C#

using UnityEngine;
public class TowerDeleter : MonoBehaviour
{
public void Delete()
{
Tower tower = transform.parent.parent.GetComponentInChildren<Tower>();
Destroy(tower.gameObject);
}
}