Beispiel #1
0
        static bool MatchesExact(IEntityOld entity, ByteFlag components)
        {
            for (byte i = 0; i < EntityUtility.IdCount; i++)
            {
                if (components[i] != entity.HasComponent(EntityUtility.GetComponentType(i)))
                {
                    return(false);
                }
            }

            return(true);
        }
Beispiel #2
0
 void OnDestroy()
 {
     ClearAllEntityGroups();
     EntityUtility.ClearAll();
     GC.Collect();
 }
Beispiel #3
0
 public IEntityGroupOld Filter(Type[] componentTypes, EntityMatchesOld match = EntityMatchesOld.All)
 {
     return(GetMatchGroup(match).GetGroupByComponentGroup(EntityUtility.GetComponentFlags(componentTypes)));
 }
Beispiel #4
0
 public static IEntityOld GetEntity(this Component component)
 {
     return(EntityUtility.GetEntity(component));
 }