protected override void OnCreate() { EquipmentBuffer = World.GetOrCreateSystem <EquipmentBufferSystem>(); EnablingQuery = GetEntityQuery(new EntityQueryDesc { All = new[] { ComponentType.ReadOnly <Enabling>() } }); DisablingQuery = GetEntityQuery(new EntityQueryDesc { All = new[] { ComponentType.ReadOnly <Disabling>() } }); }
protected override void OnCreate() { ComponentsToBeEnabled = EntityManager.CreateEntityQuery( ComponentType.ReadOnly <Enabling>(), ComponentType.ReadOnly <TEquipment>(), ComponentType.ReadOnly <Parent>() ); ComponentsToBeDisabled = EntityManager.CreateEntityQuery( ComponentType.ReadOnly <Disabling>(), ComponentType.ReadOnly <TEquipment>(), ComponentType.ReadOnly <Parent>() ); EquipmentBuffer = World.GetOrCreateSystem <EquipmentBufferSystem>(); }