You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
772 B
36 lines
772 B
using Entitas;
|
|
using UnityEngine;
|
|
|
|
namespace CoreGame.Render
|
|
{
|
|
public abstract class ProxyBase : IComponent, IReset
|
|
{
|
|
internal GameObject go;
|
|
internal bool hasInit;
|
|
public CombatEntity ent;
|
|
|
|
protected abstract void Initialize(GameObject go, CombatEntity ent);
|
|
public virtual void Init(GameObject go, CombatEntity ent)
|
|
{
|
|
if (hasInit)
|
|
return;
|
|
|
|
hasInit = true;
|
|
this.go = go;
|
|
this.ent = ent;
|
|
Initialize(go, ent);
|
|
}
|
|
|
|
public void Reset()
|
|
{
|
|
hasInit = false;
|
|
go = null;
|
|
OnReset();
|
|
}
|
|
|
|
protected virtual void OnReset()
|
|
{
|
|
|
|
}
|
|
}
|
|
}
|