internal partial class IterativeSystem
{
private static Type[] _mutTypes = [typeof(int)];
private static Type[] _readTypes = [typeof(int)];
public ReadOnlySpan<Type> MutTypes => _mutTypes;
public ReadOnlySpan<Type> ReadTypes => _readTypes;
public void Update()
{
// __DoCall(IRuntimeContext.Current.World);
}
private readonly QueryDescription __DoQuery;
private void __DoCall(World world)
{
var query = world.Query(in __DoQuery);
foreach (ref var chunk in query)
{
var componentsFirst = chunk.GetFirst<int, int>();
foreach (var entityIndex in chunk)
{
ref var t0Component = ref Unsafe.Add(ref componentsFirst.t0, entityIndex);
ref var t1Component = ref Unsafe.Add(ref componentsFirst.t1, entityIndex);
Do(t0Component, ref t1Component);
}
}
}
}
internal partial class IterativeSystem
{
private static Type[] _mutTypes = [typeof(int)];
private static Type[] _readTypes = [typeof(int)];
public ReadOnlySpan<Type> MutTypes => _mutTypes;
public ReadOnlySpan<Type> ReadTypes => _readTypes;
public void Update()
{
// __DoCall(IRuntimeContext.Current.World);
}
private readonly QueryDescription __DoQuery;
private void __DoCall(World world)
{
var query = world.Query(in __DoQuery);
foreach (ref var chunk in query)
{
var componentsFirst = chunk.GetFirst<int, int>();
foreach (var entityIndex in chunk)
{
ref var t0Component = ref Unsafe.Add(ref componentsFirst.t0, entityIndex);
ref var t1Component = ref Unsafe.Add(ref componentsFirst.t1, entityIndex);
Do(t0Component, ref t1Component);
}
}
}
}