using System; namespace DanieleMarotta.RiversongCodeShowcase { public class EntityCollectionCallbacks : IEntityCollectionCallbacks where T : Entity { public event Action Added; public event Action Removed; public void OnAdded(Entity entity) { Added?.Invoke((T)entity); } public void OnRemoved(Entity entity) { Removed?.Invoke((T)entity); } } }