protected override void OnCreate() { base.OnCreate(); _barrier = World.GetOrCreateSystem <EndSimulationEntityCommandBufferSystem>(); _eventSystem = World.GetOrCreateSystem <MessagePassingSystem>(); JobSpawner.Job = World.EntityManager.CreateArchetype( ComponentType.ReadOnly <JobTag>(), ComponentType.ReadOnly <JobUID>(), ComponentType.ReadOnly <JobOrigin>(), ComponentType.ReadOnly <JobDestination>(), ComponentType.ReadOnly <JobCreationTime>(), ComponentType.ReadOnly <CostFunction>()); }
protected override void OnCreate() { base.OnCreate(); _eventSystem = World.GetOrCreateSystem <MessagePassingSystem>(); _query = GetEntityQuery(new EntityQueryDesc { All = new[] { ComponentType.ReadOnly <HubUID>(), typeof(Translation), typeof(JobGenerationCounter), typeof(JobGenerationRate), typeof(JobGenerationTimeMark), } } ); EntityManager.CreateEntity(typeof(SimulationType)); SetSingleton(new SimulationType { Value = SimulationTypeValue.Delivery }); _eventSystem.NewEvent <JobEntityProxy>(4); _rand = new Random(1u); }