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.

18 lines
346B

  1. namespace Svelto.ECS
  2. {
  3. public interface INode
  4. {}
  5. public class NodeWithID: INode
  6. {
  7. public static TNodeType BuildNode<TNodeType>(int ID) where TNodeType: NodeWithID, new()
  8. {
  9. return new TNodeType { _ID = ID };
  10. }
  11. public int ID { get { return _ID; } }
  12. protected int _ID;
  13. }
  14. }