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.

16 lines
378B

  1. using Svelto.ECS.Internal;
  2. namespace Svelto.ECS
  3. {
  4. public struct EGIDMapper<T> where T : IEntityStruct
  5. {
  6. internal TypeSafeDictionary<T> map;
  7. public ref T entity(EGID id)
  8. {
  9. int count;
  10. var index = map.FindElementIndex(id.entityID);
  11. return ref map.GetValuesArray(out count)[index];
  12. }
  13. }
  14. }