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.

33 lines
922B

  1. namespace Svelto.ECS
  2. {
  3. public readonly struct ExclusiveBuildGroup
  4. {
  5. internal ExclusiveBuildGroup(ExclusiveGroupStruct group)
  6. {
  7. this.group = group;
  8. }
  9. public static implicit operator ExclusiveBuildGroup(ExclusiveGroupStruct group)
  10. {
  11. return new ExclusiveBuildGroup(group);
  12. }
  13. public static implicit operator ExclusiveBuildGroup(ExclusiveGroup group)
  14. {
  15. return new ExclusiveBuildGroup(group);
  16. }
  17. public static implicit operator ExclusiveGroupStruct(ExclusiveBuildGroup group)
  18. {
  19. return group.group;
  20. }
  21. public override string ToString()
  22. {
  23. return this.group.ToName();
  24. }
  25. internal ExclusiveGroupStruct @group { get; }
  26. public bool isInvalid => group == ExclusiveGroupStruct.Invalid;
  27. }
  28. }