removed the old ecs and refactored the platformer demo to use the new ecs

This commit is contained in:
Dylan Wilson
2018-06-19 21:24:56 +10:00
parent 4b8c80ec14
commit 89dbb71a1a
44 changed files with 213 additions and 2349 deletions
@@ -20,9 +20,16 @@ namespace MonoGame.Extended.Entities.Systems
{
_world = value;
_subscription = new EntitySubscription(_world.EntityManager, _aspectBuilder.Build(_world.ComponentManager));
// TODO: Undisposed events.
_world.EntityManager.EntityAdded += (sender, entityId) => OnEntityAdded(entityId);
_world.EntityManager.EntityRemoved += (sender, entityId) => OnEntityRemoved(entityId);
}
}
protected virtual void OnEntityAdded(int entityId) { }
protected virtual void OnEntityRemoved(int entityId) { }
public Bag<int> ActiveEntities => _subscription.ActiveEntities;
public abstract void Initialize(IComponentMapperService mapperService);