Skip to content

Commit a8599ab

Browse files
committed
feat(utility): 添加ActorIdGenerator工具类用于生成Actor唯一ID
添加ActorIdGenerator工具类,提供生成全局Actor ID和多Actor ID的功能 支持根据服务器ID、类型和时间戳生成唯一ID 包含获取服务器ID、Actor类型等辅助方法
1 parent 677d17c commit a8599ab

File tree

9 files changed

+71
-64
lines changed

9 files changed

+71
-64
lines changed

GameFrameX.Core/Actors/Impl/ActorLimit.cs

Lines changed: 32 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,39 @@
1-
// ==========================================================================================
2-
// GameFrameX 组织及其衍生项目的版权、商标、专利及其他相关权利
3-
// GameFrameX organization and its derivative projects' copyrights, trademarks, patents, and related rights
4-
// 均受中华人民共和国及相关国际法律法规保护。
5-
// are protected by the laws of the People's Republic of China and relevant international regulations.
6-
//
7-
// 使用本项目须严格遵守相应法律法规及开源许可证之规定。
8-
// Usage of this project must strictly comply with applicable laws, regulations, and open-source licenses.
9-
//
10-
// 本项目采用 MIT 许可证与 Apache License 2.0 双许可证分发,
11-
// This project is dual-licensed under the MIT License and Apache License 2.0,
12-
// 完整许可证文本请参见源代码根目录下的 LICENSE 文件。
13-
// please refer to the LICENSE file in the root directory of the source code for the full license text.
14-
//
15-
// 禁止利用本项目实施任何危害国家安全、破坏社会秩序、
16-
// It is prohibited to use this project to engage in any activities that endanger national security, disrupt social order,
17-
// 侵犯他人合法权益等法律法规所禁止的行为!
18-
// or infringe upon the legitimate rights and interests of others, as prohibited by laws and regulations!
19-
// 因基于本项目二次开发所产生的一切法律纠纷与责任,
20-
// Any legal disputes and liabilities arising from secondary development based on this project
21-
// 本项目组织与贡献者概不承担。
22-
// shall be borne solely by the developer; the project organization and contributors assume no responsibility.
23-
//
24-
// GitHub 仓库:https://github.com/GameFrameX
25-
// GitHub Repository: https://github.com/GameFrameX
26-
// Gitee 仓库:https://gitee.com/GameFrameX
27-
// Gitee Repository: https://gitee.com/GameFrameX
28-
// 官方文档:https://gameframex.doc.alianblank.com/
29-
// Official Documentation: https://gameframex.doc.alianblank.com/
30-
// ==========================================================================================
31-
1+
// ==========================================================================================
2+
// GameFrameX 组织及其衍生项目的版权、商标、专利及其他相关权利
3+
// GameFrameX organization and its derivative projects' copyrights, trademarks, patents, and related rights
4+
// 均受中华人民共和国及相关国际法律法规保护。
5+
// are protected by the laws of the People's Republic of China and relevant international regulations.
6+
//
7+
// 使用本项目须严格遵守相应法律法规及开源许可证之规定。
8+
// Usage of this project must strictly comply with applicable laws, regulations, and open-source licenses.
9+
//
10+
// 本项目采用 MIT 许可证与 Apache License 2.0 双许可证分发,
11+
// This project is dual-licensed under the MIT License and Apache License 2.0,
12+
// 完整许可证文本请参见源代码根目录下的 LICENSE 文件。
13+
// please refer to the LICENSE file in the root directory of the source code for the full license text.
14+
//
15+
// 禁止利用本项目实施任何危害国家安全、破坏社会秩序、
16+
// It is prohibited to use this project to engage in any activities that endanger national security, disrupt social order,
17+
// 侵犯他人合法权益等法律法规所禁止的行为!
18+
// or infringe upon the legitimate rights and interests of others, as prohibited by laws and regulations!
19+
// 因基于本项目二次开发所产生的一切法律纠纷与责任,
20+
// Any legal disputes and liabilities arising from secondary development based on this project
21+
// 本项目组织与贡献者概不承担。
22+
// shall be borne solely by the developer; the project organization and contributors assume no responsibility.
23+
//
24+
// GitHub 仓库:https://github.com/GameFrameX
25+
// GitHub Repository: https://github.com/GameFrameX
26+
// Gitee 仓库:https://gitee.com/GameFrameX
27+
// Gitee Repository: https://gitee.com/GameFrameX
28+
// 官方文档:https://gameframex.doc.alianblank.com/
29+
// Official Documentation: https://gameframex.doc.alianblank.com/
30+
// ==========================================================================================
31+
3232
using System.Collections.Concurrent;
3333
using GameFrameX.Core.Abstractions;
3434
using GameFrameX.Core.Utility;
3535
using GameFrameX.Foundation.Logger;
36+
using GameFrameX.Utility;
3637

3738
namespace GameFrameX.Core.Actors.Impl;
3839

GameFrameX.Core/Actors/Impl/WorkActor.cs

Lines changed: 32 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,38 @@
1-
// ==========================================================================================
2-
// GameFrameX 组织及其衍生项目的版权、商标、专利及其他相关权利
3-
// GameFrameX organization and its derivative projects' copyrights, trademarks, patents, and related rights
4-
// 均受中华人民共和国及相关国际法律法规保护。
5-
// are protected by the laws of the People's Republic of China and relevant international regulations.
6-
//
7-
// 使用本项目须严格遵守相应法律法规及开源许可证之规定。
8-
// Usage of this project must strictly comply with applicable laws, regulations, and open-source licenses.
9-
//
10-
// 本项目采用 MIT 许可证与 Apache License 2.0 双许可证分发,
11-
// This project is dual-licensed under the MIT License and Apache License 2.0,
12-
// 完整许可证文本请参见源代码根目录下的 LICENSE 文件。
13-
// please refer to the LICENSE file in the root directory of the source code for the full license text.
14-
//
15-
// 禁止利用本项目实施任何危害国家安全、破坏社会秩序、
16-
// It is prohibited to use this project to engage in any activities that endanger national security, disrupt social order,
17-
// 侵犯他人合法权益等法律法规所禁止的行为!
18-
// or infringe upon the legitimate rights and interests of others, as prohibited by laws and regulations!
19-
// 因基于本项目二次开发所产生的一切法律纠纷与责任,
20-
// Any legal disputes and liabilities arising from secondary development based on this project
21-
// 本项目组织与贡献者概不承担。
22-
// shall be borne solely by the developer; the project organization and contributors assume no responsibility.
23-
//
24-
// GitHub 仓库:https://github.com/GameFrameX
25-
// GitHub Repository: https://github.com/GameFrameX
26-
// Gitee 仓库:https://gitee.com/GameFrameX
27-
// Gitee Repository: https://gitee.com/GameFrameX
28-
// 官方文档:https://gameframex.doc.alianblank.com/
29-
// Official Documentation: https://gameframex.doc.alianblank.com/
30-
// ==========================================================================================
31-
1+
// ==========================================================================================
2+
// GameFrameX 组织及其衍生项目的版权、商标、专利及其他相关权利
3+
// GameFrameX organization and its derivative projects' copyrights, trademarks, patents, and related rights
4+
// 均受中华人民共和国及相关国际法律法规保护。
5+
// are protected by the laws of the People's Republic of China and relevant international regulations.
6+
//
7+
// 使用本项目须严格遵守相应法律法规及开源许可证之规定。
8+
// Usage of this project must strictly comply with applicable laws, regulations, and open-source licenses.
9+
//
10+
// 本项目采用 MIT 许可证与 Apache License 2.0 双许可证分发,
11+
// This project is dual-licensed under the MIT License and Apache License 2.0,
12+
// 完整许可证文本请参见源代码根目录下的 LICENSE 文件。
13+
// please refer to the LICENSE file in the root directory of the source code for the full license text.
14+
//
15+
// 禁止利用本项目实施任何危害国家安全、破坏社会秩序、
16+
// It is prohibited to use this project to engage in any activities that endanger national security, disrupt social order,
17+
// 侵犯他人合法权益等法律法规所禁止的行为!
18+
// or infringe upon the legitimate rights and interests of others, as prohibited by laws and regulations!
19+
// 因基于本项目二次开发所产生的一切法律纠纷与责任,
20+
// Any legal disputes and liabilities arising from secondary development based on this project
21+
// 本项目组织与贡献者概不承担。
22+
// shall be borne solely by the developer; the project organization and contributors assume no responsibility.
23+
//
24+
// GitHub 仓库:https://github.com/GameFrameX
25+
// GitHub Repository: https://github.com/GameFrameX
26+
// Gitee 仓库:https://gitee.com/GameFrameX
27+
// Gitee Repository: https://gitee.com/GameFrameX
28+
// 官方文档:https://gameframex.doc.alianblank.com/
29+
// Official Documentation: https://gameframex.doc.alianblank.com/
30+
// ==========================================================================================
31+
3232
using System.Threading.Tasks.Dataflow;
3333
using GameFrameX.Core.Abstractions;
3434
using GameFrameX.Core.Utility;
35+
using GameFrameX.Utility;
3536
using GameFrameX.Utility.Setting;
3637
using Serilog;
3738

GameFrameX.Core/BaseHandler/GlobalComponentHandler.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
using GameFrameX.Core.Components;
3535
using GameFrameX.Core.Utility;
3636
using GameFrameX.NetWork.Abstractions;
37+
using GameFrameX.Utility;
3738

3839
namespace GameFrameX.Core.BaseHandler;
3940

GameFrameX.Core/BaseHandler/GlobalRpcComponentHandler.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
using GameFrameX.Core.Components;
3535
using GameFrameX.Core.Utility;
3636
using GameFrameX.NetWork.Abstractions;
37+
using GameFrameX.Utility;
3738

3839
namespace GameFrameX.Core.BaseHandler;
3940

GameFrameX.Core/BaseHandler/PlayerComponentHandler.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
using GameFrameX.Core.BaseHandler.Normal;
3434
using GameFrameX.Core.Utility;
3535
using GameFrameX.NetWork.Abstractions;
36+
using GameFrameX.Utility;
3637
using GameFrameX.Utility.Setting;
3738

3839
namespace GameFrameX.Core.BaseHandler;

GameFrameX.Core/BaseHandler/PlayerRpcComponentHandler.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
using GameFrameX.Core.BaseHandler.RPC;
3434
using GameFrameX.Core.Utility;
3535
using GameFrameX.NetWork.Abstractions;
36+
using GameFrameX.Utility;
3637
using GameFrameX.Utility.Setting;
3738

3839
namespace GameFrameX.Core.BaseHandler;

GameFrameX.Core/Components/ComponentRegister.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
using GameFrameX.Core.Utility;
3939
using GameFrameX.Foundation.Extensions;
4040
using GameFrameX.Foundation.Logger;
41+
using GameFrameX.Utility;
4142
using GameFrameX.Utility.Setting;
4243

4344
namespace GameFrameX.Core.Components;

GameFrameX.Core/Timer/QuartzTimer.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
using GameFrameX.Core.Timer.Handler;
3636
using GameFrameX.Core.Utility;
3737
using GameFrameX.Foundation.Logger;
38+
using GameFrameX.Utility;
3839
using Quartz;
3940
using Quartz.Impl;
4041
using Quartz.Logging;

GameFrameX.Core/Utility/ActorIdGenerator.cs renamed to GameFrameX.Utility/ActorIdGenerator.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,9 @@
2929
// Official Documentation: https://gameframex.doc.alianblank.com/
3030
// ==========================================================================================
3131

32-
using GameFrameX.Utility;
3332
using GameFrameX.Utility.Setting;
3433

35-
namespace GameFrameX.Core.Utility;
34+
namespace GameFrameX.Utility;
3635

3736
/// <summary>
3837
/// ActorId 生成器

0 commit comments

Comments
 (0)