using UnityEngine;
namespace TowerDefense.Agents
{
///
/// A component that will apply various effects on an agent
///
public abstract class AgentEffect : MonoBehaviour
{
///
/// Reference to the agent that will be affected
///
protected Agent m_Agent;
public virtual void Awake()
{
LazyLoad();
}
///
/// A lazy way to ensure that will not be null
///
public virtual void LazyLoad()
{
if (m_Agent == null)
{
m_Agent = GetComponent();
}
}
}
}