提交示例代码
This commit is contained in:
@@ -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();
|
||||
}
|
||||
@@ -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>();
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
using Fantasy.Entitas;
|
||||
|
||||
namespace Fantasy;
|
||||
|
||||
public sealed class ChatUnitManageComponent : Entity
|
||||
{
|
||||
public readonly Dictionary<long, ChatUnit> Units = new();
|
||||
}
|
||||
Reference in New Issue
Block a user