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.

24 lines
858B

  1. namespace Svelto.ECS
  2. {
  3. /// <summary>
  4. /// still experimental alternative to ExclusiveGroup, use this like:
  5. /// use this like:
  6. /// public class TriggersGroup : ExclusiveGroup<TriggersGroup> {}
  7. /// </summary>
  8. /// <typeparam name="T"></typeparam>
  9. public abstract class NamedExclusiveGroup<T>
  10. {
  11. public static ExclusiveGroup Group = new ExclusiveGroup();
  12. public static string name = typeof(T).FullName;
  13. static NamedExclusiveGroup()
  14. {
  15. #if DEBUG
  16. GroupNamesMap.idToName[(uint) Group] = $"{name} ID {(uint)Group}";
  17. #endif
  18. GroupHashMap.RegisterGroup(Group, $"{name}");
  19. }
  20. // protected NamedExclusiveGroup(string recognizeAs) : base(recognizeAs) {}
  21. // protected NamedExclusiveGroup(ushort range) : base(range) {}
  22. }
  23. }