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.

RemoveEntityImplementor.cs 1.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. namespace Svelto.ECS.Internal
  2. {
  3. sealed class RemoveEntityImplementor : IRemoveEntityComponent
  4. {
  5. public RemoveEntityImplementor(IEntityDescriptor descriptor, int groupID) : this(descriptor)
  6. {
  7. removeEntityInfo = new RemoveEntityInfo(descriptor, groupID);
  8. }
  9. internal RemoveEntityImplementor(IEntityDescriptor descriptor)
  10. {
  11. removeEntityInfo = new RemoveEntityInfo(descriptor);
  12. }
  13. internal RemoveEntityInfo removeEntityInfo;
  14. }
  15. }
  16. namespace Svelto.ECS
  17. {
  18. public interface IRemoveEntityComponent
  19. {}
  20. public struct RemoveEntityInfo
  21. {
  22. readonly public IEntityDescriptor descriptor;
  23. readonly public int groupID;
  24. readonly public bool isInAGroup;
  25. public RemoveEntityInfo(IEntityDescriptor descriptor) : this()
  26. {
  27. this.descriptor = descriptor;
  28. }
  29. public RemoveEntityInfo(IEntityDescriptor descriptor, int groupID)
  30. {
  31. this.descriptor = descriptor;
  32. this.groupID = groupID;
  33. isInAGroup = true;
  34. }
  35. }
  36. }