Exemplo n.º 1
0
 protected ManualBatchedSystem(IComponentDatabase componentDatabase, IComponentTypeLookup componentTypeLookup, IThreadHandler threadHandler, IObservableGroupManager observableGroupManager)
 {
     ComponentDatabase      = componentDatabase;
     ComponentTypeLookup    = componentTypeLookup;
     ThreadHandler          = threadHandler;
     ObservableGroupManager = observableGroupManager;
 }
Exemplo n.º 2
0
 public ReactToDataSystemHandler(IObservableGroupManager observableGroupManager)
 {
     ObservableGroupManager = observableGroupManager;
     _systemSubscriptions   = new Dictionary <ISystem, IDisposable>();
     _entitySubscriptions   = new Dictionary <ISystem, IDictionary <int, IDisposable> >();
     _processEntityMethod   = GetType().GetMethod("ProcessEntity");
 }
Exemplo n.º 3
0
 public BasicEntitySystemHandler(IObservableGroupManager observableGroupManager, IThreadHandler threadHandler, IUpdateScheduler updateScheduler)
 {
     _observableGroupManager = observableGroupManager;
     _threadHandler          = threadHandler;
     UpdateScheduler         = updateScheduler;
     _systemSubscriptions    = new Dictionary <ISystem, IDisposable>();
 }
Exemplo n.º 4
0
 public BatchManager(IComponentDatabase componentDatabase, IComponentTypeLookup componentTypeLookup, IBatchBuilderFactory batchBuilderFactory, IReferenceBatchBuilderFactory referenceBatchBuilderFactory, IObservableGroupManager observableGroupManager)
 {
     ComponentDatabase            = componentDatabase;
     ComponentTypeLookup          = componentTypeLookup;
     BatchBuilderFactory          = batchBuilderFactory;
     ObservableGroupManager       = observableGroupManager;
     ReferenceBatchBuilderFactory = referenceBatchBuilderFactory;
 }
 public SpriteBatchSystemHandler(IObservableGroupManager observableGroupManager, IEcsRxGraphicsDevice graphicsDevice, IRenderTarget2dRegistry renderTarget2dRegistry, IGameScheduler scheduler)
 {
     ObservableGroupManager  = observableGroupManager;
     _systemSubscriptions    = new Dictionary <ISystem, IDisposable>();
     _graphicsDevice         = graphicsDevice;
     _gameScheduler          = scheduler;
     _renderTarget2dRegistry = renderTarget2dRegistry;
 }
Exemplo n.º 6
0
        private SystemExecutor CreateExecutor(IObservableGroupManager observableGroupManager)
        {
            var threadHandler         = new DefaultThreadHandler();
            var reactsToEntityHandler = new ReactToEntitySystemHandler(observableGroupManager);
            var reactsToGroupHandler  = new ReactToGroupSystemHandler(observableGroupManager, threadHandler);
            var reactsToDataHandler   = new ReactToDataSystemHandler(observableGroupManager);
            var manualSystemHandler   = new ManualSystemHandler(observableGroupManager);
            var setupHandler          = new SetupSystemHandler(observableGroupManager);
            var teardownHandler       = new TeardownSystemHandler(observableGroupManager);

            var conventionalSystems = new List <IConventionalSystemHandler>
            {
                setupHandler,
                reactsToEntityHandler,
                reactsToGroupHandler,
                reactsToDataHandler,
                manualSystemHandler,
                teardownHandler
            };

            return(new SystemExecutor(conventionalSystems));
        }
Exemplo n.º 7
0
 public TeardownSystemHandler(IObservableGroupManager observableGroupManager)
 {
     ObservableGroupManager = observableGroupManager;
     SystemSubscriptions    = new Dictionary <ISystem, IDisposable>();
 }
 public GroupBindingSystemHandler(IObservableGroupManager observableGroupManager)
 {
     ObservableGroupManager = observableGroupManager;
 }
Exemplo n.º 9
0
 public IObservableGroup GetPlayerGroup(IObservableGroupManager observableGroupManager)
 {
     return(observableGroupManager.GetObservableGroup(new Group(typeof(PlayerStateComponent))));
 }
Exemplo n.º 10
0
 public TriggerPipelineSystem(PostJsonHttpPipeline saveJsonPipeline, IObservableGroupManager observableGroupManager)
 {
     SaveJsonPipeline = saveJsonPipeline;
     PlayerGroup      = GetPlayerGroup(observableGroupManager);
 }
Exemplo n.º 11
0
 public ExampleBatchedSystem(IComponentDatabase componentDatabase, IComponentTypeLookup componentTypeLookup,
                             IReferenceBatchBuilderFactory batchBuilderFactory, IThreadHandler threadHandler, IObservableGroupManager observableGroupManager)
     : base(componentDatabase, componentTypeLookup, batchBuilderFactory, threadHandler, observableGroupManager)
 {
 }
Exemplo n.º 12
0
 /// <summary>
 /// Resolve any dependencies the application needs
 /// </summary>
 /// <remarks>By default it will setup IEntityDatabase, IObservableGroupManager and base class dependencies</remarks>
 protected override void ResolveApplicationDependencies()
 {
     base.ResolveApplicationDependencies();
     EntityDatabase         = Container.Resolve <IEntityDatabase>();
     ObservableGroupManager = Container.Resolve <IObservableGroupManager>();
 }
Exemplo n.º 13
0
        public TurnsSystem(GameConfiguration gameConfiguration, IEventSystem eventSystem, IObservableGroupManager observableGroupManager)
        {
            _gameConfiguration = gameConfiguration;
            _eventSystem       = eventSystem;

            _levelAccessor = observableGroupManager.GetObservableGroup(new Group(typeof(LevelComponent)));
        }
Exemplo n.º 14
0
 public ReactToGroupSystemHandler(IObservableGroupManager observableGroupManager, IThreadHandler threadHandler)
 {
     _observableGroupManager = observableGroupManager;
     _threadHandler          = threadHandler;
     _systemSubscriptions    = new Dictionary <ISystem, IDisposable>();
 }
Exemplo n.º 15
0
 public ManualSystemHandler(IObservableGroupManager observableGroupManager)
 {
     ObservableGroupManager = observableGroupManager;
 }
Exemplo n.º 16
0
 protected ReferenceBatchedSystem(IComponentDatabase componentDatabase, IComponentTypeLookup componentTypeLookup,
                                  IReferenceBatchBuilderFactory batchBuilderFactory, IThreadHandler threadHandler, IObservableGroupManager observableGroupManager) : base(componentDatabase,
                                                                                                                                                                          componentTypeLookup, threadHandler, observableGroupManager)
 {
     _batchBuilder = batchBuilderFactory.Create <T1, T2>();
 }
Exemplo n.º 17
0
 public ReactToEntitySystemHandler(IObservableGroupManager observableGroupManager)
 {
     ObservableGroupManager = observableGroupManager;
     _systemSubscriptions   = new Dictionary <ISystem, IDisposable>();
     _entitySubscriptions   = new Dictionary <ISystem, IDictionary <int, IDisposable> >();
 }
Exemplo n.º 18
0
 public BatchedMovementSystem(IComponentDatabase componentDatabase, IComponentTypeLookup componentTypeLookup, IBatchBuilderFactory batchBuilderFactory, IThreadHandler threadHandler, IObservableGroupManager observableGroupManager)
     : base(componentDatabase, componentTypeLookup, batchBuilderFactory, threadHandler, observableGroupManager)
 {
 }