public abstract class EcsRxApplication
public ISystemExecutor SystemExecutor { get; }
public IEventSystem EventSystem { get; }
public IObservableGroupManager ObservableGroupManager { get; }
public IEntityDatabase EntityDatabase { get; }
protected EcsRxApplication()
// For sending events around
EventSystem = new EventSystem(new MessageBroker());
// For mapping component types to underlying indexes
var componentTypeAssigner = new DefaultComponentTypeAssigner();
var allComponents = componentTypeAssigner.GenerateComponentLookups();
var componentLookup = new ComponentTypeLookup(allComponents);
// For interacting with the component databases
var componentDatabase = new ComponentDatabase(componentLookup);
var componentRepository = new ComponentRepository(componentLookup, componentDatabase);
// For creating entities, collections, observable groups and managing Ids
var entityFactory = new DefaultEntityFactory(new IdPool(), componentRepository);
var entityCollectionFactory = new DefaultEntityCollectionFactory(entityFactory);
EntityDatabase = new EntityDatabase(entityFactory);
var observableGroupFactory = new DefaultObservableObservableGroupFactory();
ObservableGroupManager = new EntityCollectionManager(observableGroupFactory, entityDatabase, componentLookup);
// All system handlers for the system types you want to support
var manualSystemHandler = new ManualSystemHandler(ObservableGroupManager);
var basicSystemHandler = new BasicSystemHandler(ObservableGroupManager);
var conventionalSystems = new List<IConventionalSystemHandler>
// The main executor which manages how systems are given information
SystemExecutor = new SystemExecutor(conventionalSystems);
public abstract void StartApplication();