public BasicEntitySystemHandler(IObservableGroupManager observableGroupManager, IThreadHandler threadHandler, IUpdateScheduler updateScheduler)
 {
     _observableGroupManager = observableGroupManager;
     _threadHandler          = threadHandler;
     UpdateScheduler         = updateScheduler;
     _systemSubscriptions    = new Dictionary <ISystem, IDisposable>();
 }
 protected ManualBatchedSystem(IComponentDatabase componentDatabase, IComponentTypeLookup componentTypeLookup, IThreadHandler threadHandler, IObservableGroupManager observableGroupManager)
 {
     ComponentDatabase      = componentDatabase;
     ComponentTypeLookup    = componentTypeLookup;
     ThreadHandler          = threadHandler;
     ObservableGroupManager = observableGroupManager;
 }
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="m_handler"></param>
        public LeadFollowerThreadPool(IThreadHandler m_handler)
        {
            if (m_handler == null) {
                throw new NullReferenceException();
            }

            this.m_handler = m_handler;
        }
        private void OnEnable()
        {
            // Inject platform-specific dependencies

#if UNITY_EDITOR
            if (_processId < 0)
            {
                _processId = System.Diagnostics.Process.GetCurrentProcess().Id;
            }

            // Create settings object in the editor
            var serializedInstance = Resources.Load("FluvioManager", typeof(FluvioSettings)) as FluvioSettings;
            if (!serializedInstance)
            {
                var instance = FluvioSettings.GetFluvioSettingsObject();
                serializedInstance = CreateProjectSettingsAsset(instance, "Resources", "FluvioManager.asset");
            }
            FluvioSettings.SetFluvioSettingsObject(serializedInstance);
            FluvioComputeShader.SetIncludeParser(new ComputeIncludeParser());
            UnityEditor.EditorApplication.update += EditorUpdate;
#endif

            // OpenCL support
#if UNITY_STANDALONE// || UNITY_ANDROID // TODO - Android support for OpenCL is WIP
            Cloo.Bindings.CLInterface.SetInterface(new Cloo.Bindings.CL12());
#endif

            // Multithreading
#if !UNITY_WEBGL && !UNITY_WINRT
            _threadFactory             = new ThreadFactory();
            _threadHandler             = new ThreadHandler();
            _interlocked               = new Interlocked();
            FluidBase.onFluidEnabled  += OnFluidEnabled;
            FluidBase.onFluidDisabled += OnFluidDisabled;
            OnFluidEnabled(null);
#endif
        }
Example #5
0
 protected BatchedSystem(IComponentDatabase componentDatabase, IComponentTypeLookup componentTypeLookup,
                         IBatchBuilderFactory batchBuilderFactory, IThreadHandler threadHandler) : base(componentDatabase,
                                                                                                        componentTypeLookup, threadHandler)
 {
     _batchBuilder = batchBuilderFactory.Create <T1, T2>();
 }
 public ExampleBatchedSystem(IComponentDatabase componentDatabase, IComponentTypeLookup componentTypeLookup,
                             IReferenceBatchBuilderFactory batchBuilderFactory, IThreadHandler threadHandler, IObservableGroupManager observableGroupManager)
     : base(componentDatabase, componentTypeLookup, batchBuilderFactory, threadHandler, observableGroupManager)
 {
 }
 public DebugEventSystem(IMessageBroker messageBroker, IThreadHandler threadHandler) : base(messageBroker, threadHandler)
 {
     Console.WriteLine("Debugging Event System");
 }
Example #8
0
 public ReactToGroupSystemHandler(IObservableGroupManager observableGroupManager, IThreadHandler threadHandler)
 {
     _observableGroupManager = observableGroupManager;
     _threadHandler          = threadHandler;
     _systemSubscriptions    = new Dictionary <ISystem, IDisposable>();
 }
Example #9
0
 public BatchedMovementSystem(IComponentDatabase componentDatabase, IComponentTypeLookup componentTypeLookup, IBatchBuilderFactory batchBuilderFactory, IThreadHandler threadHandler) : base(componentDatabase, componentTypeLookup, batchBuilderFactory, threadHandler)
 {
 }
Example #10
0
 public CalculateResultTask(IThreadHandler sourceThread)
 {
     m_SourceThread = sourceThread;
 }
 public TestConnectionController(IStateHandler stateHandler, IThreadHandler threadHandler)
 {
     _threadHandler = threadHandler;
     _stateHandler  = stateHandler;
 }
Example #12
0
 public ProcessTask(string context, IThreadHandler threadHandler) : base(threadHandler)
 {
     m_Context = context;
 }
Example #13
0
 protected ManualBatchedSystem(IComponentDatabase componentDatabase, IComponentTypeLookup componentTypeLookup, IThreadHandler threadHandler)
 {
     ComponentDatabase   = componentDatabase;
     ComponentTypeLookup = componentTypeLookup;
     ThreadHandler       = threadHandler;
 }
 public ReactToGroupSystemHandler(IEntityCollectionManager entityCollectionManager, IThreadHandler threadHandler)
 {
     _entityCollectionManager = entityCollectionManager;
     _threadHandler           = threadHandler;
     _systemSubscriptions     = new Dictionary <ISystem, IDisposable>();
 }
Example #15
0
 public ExampleBatchedGroupSystem(IComponentDatabase componentDatabase, IComponentTypeLookup componentTypeLookup, IReferenceBatchBuilderFactory batchBuilderFactory, IThreadHandler threadHandler) : base(componentDatabase, componentTypeLookup, batchBuilderFactory, threadHandler)
 {
 }
 public ClockController(IStateHandler stateHandler, IThreadHandler threadHandler)
 {
     _threadHandler = threadHandler;
     _stateHandler  = stateHandler;
 }
Example #17
0
 protected ReferenceBatchedSystem(IComponentDatabase componentDatabase, IComponentTypeLookup componentTypeLookup,
                                  IReferenceBatchBuilderFactory batchBuilderFactory, IThreadHandler threadHandler, IObservableGroupManager observableGroupManager) : base(componentDatabase,
                                                                                                                                                                          componentTypeLookup, threadHandler, observableGroupManager)
 {
     _batchBuilder = batchBuilderFactory.Create <T1, T2>();
 }
Example #18
0
 public BatchedMovementSystem(IComponentDatabase componentDatabase, IComponentTypeLookup componentTypeLookup, IBatchBuilderFactory batchBuilderFactory, IThreadHandler threadHandler, IObservableGroupManager observableGroupManager)
     : base(componentDatabase, componentTypeLookup, batchBuilderFactory, threadHandler, observableGroupManager)
 {
 }