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.5KB

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