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.

INode.cs 557B

7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
1234567891011121314151617181920212223242526272829
  1. namespace Svelto.ECS
  2. {
  3. public interface INode
  4. {
  5. int ID { get; }
  6. }
  7. public interface IGroupedNode
  8. {
  9. int groupID { get; set; }
  10. }
  11. public interface IStructNodeWithID : INode
  12. {
  13. new int ID { get; set; }
  14. }
  15. public class NodeWithID: INode
  16. {
  17. public static TNodeType BuildNode<TNodeType>(int ID) where TNodeType: NodeWithID, new()
  18. {
  19. return new TNodeType { _ID = ID };
  20. }
  21. public int ID { get { return _ID; } }
  22. protected int _ID;
  23. }
  24. }