protected override void OnCreate() { base.OnCreate(); _destinationQuery = GetEntityQuery ( new EntityQueryDesc() { All = new ComponentType[] { ComponentType.ReadOnly <Destination>(), ComponentType.ReadOnly <Speed>() } } ); _miningEndBarrier = World.GetOrCreateSystem <MiningEndBarrier>(); }
protected override void OnCreate() { //var queryDescription0 = new EntityQueryDesc //{ // None = new[] { ComponentType.ReadOnly<Minerals>(), ComponentType.ReadOnly<Assets.Runtime.Components.Moving.Destination>() }, // All = new[] { ComponentType.ReadOnly<MineCommand>() } //}; //var queryDescription1 = new EntityQueryDesc //{ // All = new [] { ComponentType.ReadOnly<MineralDruse>(), ComponentType.ReadOnly<Translation>() } //}; //_query = GetEntityQuery(queryDescription0, queryDescription1); _queryMiners = GetEntityQuery(new EntityQueryDesc() { None = new[] { ComponentType.ReadOnly <Minerals>(), ComponentType.ReadOnly <Assets.Runtime.Components.Moving.Destination>() }, All = new[] { ComponentType.ReadOnly <MineCommand>() } }); _miningEndBarrier = World.GetOrCreateSystem <MiningEndBarrier>(); }