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

35 lines
636 B
C#
Raw Normal View History

2024-04-20 22:19:23 +02:00
using System;
using UnityEngine;
using UnityEngine.Assertions;
public abstract class Tower : MonoBehaviour
{
2024-04-20 22:42:06 +02:00
protected bool selected = false;
2024-04-20 13:15:33 +02:00
protected HealthComponent healthComp;
// Getters
2024-04-20 22:42:06 +02:00
public virtual void TowerSelected(bool selected)
{
this.selected = selected;
}
protected virtual void Awake()
{
healthComp = GetComponent<HealthComponent>();
Assert.IsNotNull(healthComp);
2024-04-20 22:19:23 +02:00
}
2024-04-20 13:15:33 +02:00
protected virtual void OnDestroy()
{
}
2024-04-20 19:22:52 +02:00
protected virtual void Update()
{
}
protected virtual void FixedUpdate()
{
}
}