Browse Source

add function for internal use

tags/2.6a
sebas77 6 years ago
parent
commit
22cfff3a07
1 changed files with 6 additions and 0 deletions
  1. +6
    -0
      Svelto.ECS/DataStructures/TypeSafeDictionary.cs

+ 6
- 0
Svelto.ECS/DataStructures/TypeSafeDictionary.cs View File

@@ -34,6 +34,7 @@ namespace Svelto.ECS.Internal
void Trim();
void Clear();
bool Has(int entityIdEntityId);
int GetFirstID();
}

class TypeSafeDictionary<TValue> : FasterDictionary<int, TValue>, ITypeSafeDictionary where TValue : IEntityStruct
@@ -80,6 +81,11 @@ namespace Svelto.ECS.Internal
return ContainsKey(entityIdEntityId);
}

public int GetFirstID()
{
return FasterValues[0].ID.entityID;
}

void AddEntityViewToEngines(Dictionary<Type, FasterList<IHandleEntityViewEngineAbstracted>> entityViewEnginesDB, ref TValue entity)
{
FasterList<IHandleEntityViewEngineAbstracted> entityViewsEngines;


Loading…
Cancel
Save