mirror of
https://github.com/DCFApixels/DragonECS.git
synced 2025-09-17 17:34:36 +08:00
add set for EcsGroup indexer
This commit is contained in:
parent
e1ae89ed7f
commit
c5013649c3
@ -241,6 +241,17 @@ namespace DCFApixels.DragonECS
|
|||||||
#endif
|
#endif
|
||||||
return _dense[++index];
|
return _dense[++index];
|
||||||
}
|
}
|
||||||
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
|
set
|
||||||
|
{
|
||||||
|
// TODO добавить лок енумератора на изменение
|
||||||
|
#if (DEBUG && !DISABLE_DEBUG) || ENABLE_DRAGONECS_ASSERT_CHEKS
|
||||||
|
if (index < 0 || index >= Count) { Throw.ArgumentOutOfRange(); }
|
||||||
|
#endif
|
||||||
|
var oldValue = _dense[index];
|
||||||
|
_dense[index] = value;
|
||||||
|
_sparse[oldValue] = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user