add indexers for pools

This commit is contained in:
DCFApixels 2025-03-13 20:40:47 +08:00
parent c4109b010c
commit cb0c299e2e
2 changed files with 12 additions and 0 deletions

View File

@ -80,6 +80,11 @@ namespace DCFApixels.DragonECS
{
get { return false; }
}
public ref T this[int index]
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
get { return ref Get(index); }
}
#endregion
#region Methods

View File

@ -91,6 +91,13 @@ namespace DCFApixels.DragonECS
{
get { return false; }
}
public bool this[int index]
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
get { return Has(index); }
[MethodImpl(MethodImplOptions.AggressiveInlining)]
set { Set(index, value); }
}
#endregion
#region Method