mirror of
https://github.com/DCFApixels/DragonECS.git
synced 2025-09-18 01:44:35 +08:00
add indexers for pool readonly wrappers
This commit is contained in:
parent
63459776f2
commit
c36642ad83
@ -418,6 +418,10 @@ namespace DCFApixels.DragonECS
|
|||||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
get { return _pool.IsReadOnly; }
|
get { return _pool.IsReadOnly; }
|
||||||
}
|
}
|
||||||
|
public ref readonly T this[int entityID]
|
||||||
|
{
|
||||||
|
get { return ref _pool.Read(entityID); }
|
||||||
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Constructors
|
#region Constructors
|
||||||
|
@ -365,6 +365,10 @@ namespace DCFApixels.DragonECS
|
|||||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
get { return _pool.IsReadOnly; }
|
get { return _pool.IsReadOnly; }
|
||||||
}
|
}
|
||||||
|
public bool this[int entityID]
|
||||||
|
{
|
||||||
|
get { return _pool.Has(entityID); }
|
||||||
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Constructors
|
#region Constructors
|
||||||
|
Loading…
Reference in New Issue
Block a user