mirror of
https://github.com/DCFApixels/DragonECS.git
synced 2025-09-19 10:34:37 +08:00
add world listeners
This commit is contained in:
parent
479fd57d37
commit
645546585e
@ -356,6 +356,17 @@ namespace DCFApixels.DragonECS
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Listeners
|
||||
public void AddListener(IEcsWorldEventListener listener)
|
||||
{
|
||||
_listeners.Add(listener);
|
||||
}
|
||||
public void RemoveListener(IEcsWorldEventListener listener)
|
||||
{
|
||||
_listeners.Remove(listener);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Debug
|
||||
public void GetComponents(int entityID, List<object> list)
|
||||
{
|
||||
|
@ -9,8 +9,8 @@
|
||||
_world = world;
|
||||
OnInitialize();
|
||||
}
|
||||
protected abstract void OnInitialize();
|
||||
internal void Destroy() => OnDestroy();
|
||||
protected abstract void OnInitialize();
|
||||
protected abstract void OnDestroy();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user