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.

28 lines
516B

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