public void PopulateReactiveCommandComponents(CommandSystem commandSystem, EntityManager entityManager, WorkerSystem workerSystem, World world) { var receivedRequests = commandSystem.GetRequests <FirstCommand.ReceivedRequest>(); // todo Not efficient if it keeps jumping all over entities but don't care right now for (int i = 0; i < receivedRequests.Count; ++i) { if (!workerSystem.TryGetEntity(receivedRequests[i].EntityId, out var entity)) { continue; } List <FirstCommand.ReceivedRequest> requests; if (entityManager.HasComponent <global::Improbable.Gdk.Tests.NonblittableTypes.NonBlittableComponent.CommandRequests.FirstCommand>(entity)) { requests = entityManager.GetComponentData <global::Improbable.Gdk.Tests.NonblittableTypes.NonBlittableComponent.CommandRequests.FirstCommand>(entity).Requests; } else { var data = new global::Improbable.Gdk.Tests.NonblittableTypes.NonBlittableComponent.CommandRequests.FirstCommand { CommandListHandle = ReferenceTypeProviders.FirstCommandRequestsProvider.Allocate(world) }; data.Requests = new List <FirstCommand.ReceivedRequest>(); requests = data.Requests; entityManager.AddComponentData(entity, data); } requests.Add(receivedRequests[i]); } var receivedResponses = commandSystem.GetResponses <FirstCommand.ReceivedResponse>(); // todo Not efficient if it keeps jumping all over entities but don't care right now for (int i = 0; i < receivedResponses.Count; ++i) { ref readonly var response = ref receivedResponses[i];
public DispatcherHandler(WorkerSystem worker, World world) : base(worker, world) { entityManager = world.GetOrCreateManager <EntityManager>(); var bookkeepingSystem = world.GetOrCreateManager <CommandRequestTrackerSystem>(); }
protected SubscriptionManager(World world) { World = world; WorkerSystem = world.GetExistingSystem <WorkerSystem>(); }
public void PopulateReactiveComponents(ComponentUpdateSystem updateSystem, EntityManager entityManager, WorkerSystem workerSystem, World world) { var updatesReceived = updateSystem.GetComponentUpdatesReceived <Update>(); for (int i = 0; i < updatesReceived.Count; ++i) { ref readonly var update = ref updatesReceived[i];
public EntityGameObjectLinker(World world, WorkerSystem worker) { this.world = world; this.worker = worker; entityManager = world.GetExistingManager <EntityManager>(); }
public TestComponentDispatcherBase(WorkerSystem worker, World world) : base(worker, world) { EntityManager = world.GetOrCreateManager <EntityManager>(); }
public SecondComponentDispatcher(WorkerSystem worker, World world) : base(worker, world) { }
public FirstComponentDispatcher(WorkerSystem worker, World world) : base(worker, world) { }