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.

IEntityFunctions.cs 1.7KB

12345678910111213141516171819202122232425262728293031323334
  1. using System.Runtime.CompilerServices;
  2. namespace Svelto.ECS
  3. {
  4. public interface IEntityFunctions
  5. {
  6. //being entity ID globally not unique, the group must be specified when
  7. //an entity is removed. Not specifying the group will attempt to remove
  8. //the entity from the special standard group.
  9. void RemoveEntity<T>(uint entityID, ExclusiveBuildGroup groupID, [CallerMemberName] string memberName = "") where T : IEntityDescriptor, new();
  10. void RemoveEntity<T>(EGID entityegid, [CallerMemberName] string memberName = "") where T : IEntityDescriptor, new();
  11. void RemoveEntitiesFromGroup(ExclusiveBuildGroup groupID);
  12. void SwapEntitiesInGroup<T>(ExclusiveBuildGroup fromGroupID, ExclusiveBuildGroup toGroupID) where T : IEntityDescriptor, new();
  13. void SwapEntityGroup<T>(uint entityID, ExclusiveBuildGroup fromGroupID, ExclusiveBuildGroup toGroupID)
  14. where T : IEntityDescriptor, new();
  15. void SwapEntityGroup<T>(EGID fromID, ExclusiveBuildGroup toGroupID) where T : IEntityDescriptor, new();
  16. void SwapEntityGroup<T>(EGID fromID, ExclusiveBuildGroup toGroupID, ExclusiveBuildGroup mustBeFromGroup)
  17. where T : IEntityDescriptor, new();
  18. void SwapEntityGroup<T>(EGID fromID, EGID toId) where T : IEntityDescriptor, new();
  19. void SwapEntityGroup<T>(EGID fromID, EGID toId, ExclusiveBuildGroup mustBeFromGroup)
  20. where T : IEntityDescriptor, new();
  21. #if UNITY_NATIVE
  22. NativeEntityRemove ToNativeRemove<T>(string memberName) where T : IEntityDescriptor, new();
  23. NativeEntitySwap ToNativeSwap<T>(string memberName) where T : IEntityDescriptor, new();
  24. #endif
  25. }
  26. }