Mirror of Svelto.ECS because we're a fan of it
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

40 řádky
1.3KB

  1. #if SVELTO_LEGACY_FILTERS
  2. using System.Runtime.CompilerServices;
  3. using Svelto.DataStructures;
  4. namespace Svelto.ECS
  5. {
  6. public readonly struct LegacyFilteredIndices
  7. {
  8. public LegacyFilteredIndices(NativeDynamicArrayCast<uint> denseListOfIndicesToEntityComponentArray)
  9. {
  10. _denseListOfIndicesToEntityComponentArray = denseListOfIndicesToEntityComponentArray;
  11. _count = _denseListOfIndicesToEntityComponentArray.count;
  12. }
  13. public int count
  14. {
  15. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  16. get { return _count; }
  17. }
  18. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  19. public uint Get(uint index) => _denseListOfIndicesToEntityComponentArray[index];
  20. public uint this[uint index]
  21. {
  22. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  23. get => _denseListOfIndicesToEntityComponentArray[index];
  24. }
  25. public uint this[int index]
  26. {
  27. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  28. get => _denseListOfIndicesToEntityComponentArray[index];
  29. }
  30. readonly NativeDynamicArrayCast<uint> _denseListOfIndicesToEntityComponentArray;
  31. readonly int _count;
  32. }
  33. }
  34. #endif