Changed project name

This commit is contained in:
2025-12-04 16:55:26 +09:00
parent 3bbf485fce
commit 93bc8e55a3
54 changed files with 1819 additions and 613 deletions

View File

@@ -0,0 +1,73 @@
using Ghost.SparseEntities.Components;
using System.Runtime.CompilerServices;
namespace Ghost.SparseEntities.Query;
public interface IQueryTypeParameter<T>
where T : IComponentData
{
}
public ref struct CompRef<T> : IQueryTypeParameter<T>
where T : IComponentData
{
internal ref T _value;
public ref T ValueRW
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
get => ref _value;
}
public readonly ref T ValueRO
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
get => ref _value;
}
public readonly bool IsValid
{
get;
init;
}
public CompRef(ref T value, bool isValid)
{
_value = ref value;
IsValid = isValid;
}
public CompRef(ref T value)
: this(ref value, true)
{
}
}
public readonly ref struct CompRO<T> : IQueryTypeParameter<T>
where T : IComponentData
{
internal readonly ref T _value;
public readonly ref T ValueRO
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
get => ref _value;
}
public readonly bool IsValid
{
get;
init;
}
public CompRO(ref T value, bool isValid)
{
_value = ref value;
IsValid = isValid;
}
public CompRO(ref T value)
: this(ref value, true)
{
}
}