diff --git a/src/Filter.cs b/src/Filter.cs index f841c39..94f5ee9 100644 --- a/src/Filter.cs +++ b/src/Filter.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using MoonTools.ECS.Collections; namespace MoonTools.ECS { @@ -8,7 +9,7 @@ namespace MoonTools.ECS internal FilterSignature Signature; private FilterStorage FilterStorage; - internal Filter(FilterStorage filterStorage, HashSet included, HashSet excluded) + internal Filter(FilterStorage filterStorage, IndexableSet included, IndexableSet excluded) { FilterStorage = filterStorage; Signature = new FilterSignature(included, excluded); diff --git a/src/FilterBuilder.cs b/src/FilterBuilder.cs index ed1562e..8a8a6d1 100644 --- a/src/FilterBuilder.cs +++ b/src/FilterBuilder.cs @@ -1,5 +1,4 @@ -using System; -using System.Collections.Generic; +using MoonTools.ECS.Collections; namespace MoonTools.ECS { @@ -7,18 +6,18 @@ namespace MoonTools.ECS { private TypeIndices ComponentTypeIndices; private FilterStorage FilterStorage; - private HashSet Included; - private HashSet Excluded; + private IndexableSet Included; + private IndexableSet Excluded; internal FilterBuilder(FilterStorage filterStorage, TypeIndices componentTypeIndices) { FilterStorage = filterStorage; ComponentTypeIndices = componentTypeIndices; - Included = new HashSet(); - Excluded = new HashSet(); + Included = new IndexableSet(); + Excluded = new IndexableSet(); } - private FilterBuilder(FilterStorage filterStorage, TypeIndices componentTypeIndices, HashSet included, HashSet excluded) + private FilterBuilder(FilterStorage filterStorage, TypeIndices componentTypeIndices, IndexableSet included, IndexableSet excluded) { FilterStorage = filterStorage; ComponentTypeIndices = componentTypeIndices; diff --git a/src/FilterSignature.cs b/src/FilterSignature.cs index 3877391..f0eeaba 100644 --- a/src/FilterSignature.cs +++ b/src/FilterSignature.cs @@ -1,14 +1,15 @@ using System; using System.Collections.Generic; +using MoonTools.ECS.Collections; namespace MoonTools.ECS { public struct FilterSignature : IEquatable { - public readonly HashSet Included; - public readonly HashSet Excluded; + public readonly IndexableSet Included; + public readonly IndexableSet Excluded; - public FilterSignature(HashSet included, HashSet excluded) + public FilterSignature(IndexableSet included, IndexableSet excluded) { Included = included; Excluded = excluded; diff --git a/src/FilterStorage.cs b/src/FilterStorage.cs index fc7718f..163751e 100644 --- a/src/FilterStorage.cs +++ b/src/FilterStorage.cs @@ -20,7 +20,7 @@ namespace MoonTools.ECS ComponentTypeIndices = componentTypeIndices; } - public Filter CreateFilter(HashSet included, HashSet excluded) + public Filter CreateFilter(IndexableSet included, IndexableSet excluded) { var filterSignature = new FilterSignature(included, excluded); if (!filterSignatureToEntityIDs.ContainsKey(filterSignature))