UIDDefine.cs 310 B

123456789101112131415
  1. namespace XGame
  2. {
  3. public static class UIDDefine
  4. {
  5. private static long UID_ADD = 0;
  6. /// <summary>
  7. /// 自增的UID,全局唯一
  8. /// </summary>
  9. /// <returns></returns>
  10. public static long New()
  11. {
  12. return ++UID_ADD;
  13. }
  14. }
  15. }