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.

IEngine.cs 1.6KB

7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. using Svelto.DataStructures;
  2. using Svelto.ECS.Internal;
  3. namespace Svelto.ECS.Internal
  4. {
  5. public interface IStructNodeEngine : IEngine
  6. {
  7. void CreateStructNodes(SharedStructNodeLists sharedStructNodeLists);
  8. }
  9. public interface IGroupedStructNodesEngine : IEngine
  10. {
  11. void CreateStructNodes(SharedGroupedStructNodesLists sharedStructNodeLists);
  12. }
  13. public interface IActivableNodeEngine : IEngine
  14. {
  15. void Enable(ITypeSafeList nodes);
  16. void Disable(ITypeSafeList nodes);
  17. }
  18. public interface INodeEngine : IEngine
  19. {
  20. void Add(ITypeSafeList nodes);
  21. void Remove(ITypeSafeList nodes);
  22. }
  23. public interface INodesEngine : INodeEngine
  24. {
  25. System.Type[] AcceptedNodes();
  26. }
  27. }
  28. namespace Svelto.ECS
  29. {
  30. public interface IEngine
  31. {}
  32. public interface IActivableNodeEngine<in TNodeType> : IActivableNodeEngine where TNodeType : INode
  33. { }
  34. public interface IQueryableNodeEngine:IEngine
  35. {
  36. IEngineNodeDB nodesDB { set; }
  37. }
  38. /// <summary>
  39. /// The engines can receive and store INodes structs
  40. /// Unboxing will happen during the Add, but the
  41. /// data will then be stored and processed as stucts
  42. /// </summary>
  43. public interface IStructNodeEngine<T> : IStructNodeEngine where T:struct, IStructNodeWithID
  44. { }
  45. /// <summary>
  46. /// same as above, but the nodes are grouped by ID
  47. /// usually the ID is the owner of the nodes of that
  48. /// group
  49. /// </summary>
  50. public interface IGroupedStructNodesEngine<T> : IGroupedStructNodesEngine where T:struct, IGroupedNode
  51. { }
  52. }