Mirror of Svelto.ECS because we're a fan of it
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
786B

  1. using System.Runtime.CompilerServices;
  2. using Svelto.DataStructures;
  3. namespace Svelto.ECS.Internal
  4. {
  5. public struct NativeEntityIDs: IEntityIDs
  6. {
  7. internal NativeEntityIDs(NB<SveltoDictionaryNode<uint>> native)
  8. {
  9. _native = native;
  10. }
  11. public void Update(in NB<SveltoDictionaryNode<uint>> unsafeKeys)
  12. {
  13. _native = unsafeKeys;
  14. }
  15. public uint this[uint index]
  16. {
  17. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  18. get => _native[index].key;
  19. }
  20. public uint this[int index]
  21. {
  22. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  23. get => _native[index].key;
  24. }
  25. NBInternal<SveltoDictionaryNode<uint>> _native;
  26. }
  27. }