3DTD/Assets/Scripts/Tower/Tower.cs

35 lines
636 B
C#

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