using System; using UnityEngine; using UnityEngine.Assertions; public abstract class Tower : MonoBehaviour { protected bool selected = false; protected HealthComponent healthComp; protected Outline outline; // Getters public virtual void TowerSelected(bool selected) { this.selected = selected; outline.enabled = selected; } protected virtual void Awake() { healthComp = GetComponent(); outline = GetComponent(); Assert.IsNotNull(healthComp); Assert.IsNotNull(outline); } protected virtual void Start() { } protected virtual void OnDestroy() { } protected virtual void Update() { } protected virtual void FixedUpdate() { } }