using UnityEngine; using UnityEngine.Assertions; public abstract class Tower : MonoBehaviour { public bool towerSelected { get; set; } = true; protected HealthComponent healthComp; // Getters protected virtual void Awake() { healthComp = GetComponent(); Assert.IsNotNull(healthComp); } protected virtual void OnDestroy() { } protected virtual void Update() { } protected virtual void FixedUpdate() { } }