NodeKey.cs 679 B

123456789101112131415161718192021222324252627
  1. using System;
  2. namespace XGame.Framework.Nodes
  3. {
  4. public class NodeKey
  5. {
  6. public string Key { get; private set; }
  7. /// <summary>
  8. /// 分组id
  9. /// </summary>
  10. public uint GroupId { get; private set; }
  11. /// <summary>
  12. /// Node的类型
  13. /// </summary>
  14. public Type NodeType { get; private set; }
  15. public NodeKey(string key, uint groupId, Type nodeType)
  16. {
  17. Key = key;
  18. GroupId = groupId;
  19. NodeType = nodeType;
  20. }
  21. public static implicit operator string(NodeKey nodeKey) => nodeKey.Key;
  22. public override string ToString() => Key;
  23. }
  24. }