提交示例代码

This commit is contained in:
Bob.Song
2026-03-05 11:39:06 +08:00
commit 25958f58c3
2534 changed files with 209593 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
using Fantasy.Entitas;
namespace Fantasy;
/// <summary>
/// 聊天中控中心
/// 1、申请、创建、解散聊天频道。
/// 2、管理聊天频道成员。
/// 3、根据频道ID找到对应的频道。
/// </summary>
public class ChatChannelCenterComponent : Entity
{
public readonly Dictionary<long, ChatChannelComponent> Channels = new();
}

View File

@@ -0,0 +1,16 @@
using Fantasy.Entitas;
// ReSharper disable ArrangeObjectCreationWhenTypeEvident
// ReSharper disable UsageOfDefaultStructEquality
namespace Fantasy;
/// <summary>
/// 聊天频道实体
/// 1、根据频道内的玩家进行广播聊天信息。
/// 2、当前频道如果没有玩家的话则自动销毁。
/// 3、存放当前频道的玩家信息。
/// </summary>
public sealed class ChatChannelComponent : Entity
{
public readonly HashSet<long> Units = new HashSet<long>();
}

View File

@@ -0,0 +1,8 @@
using Fantasy.Entitas;
namespace Fantasy;
public sealed class ChatUnitManageComponent : Entity
{
public readonly Dictionary<long, ChatUnit> Units = new();
}