频道聊天相关
This commit is contained in:
@@ -1,10 +1,38 @@
|
||||
using Fantasy.Entitas;
|
||||
using Fantasy.Entitas.Interface;
|
||||
using Fantasy.Helper;
|
||||
|
||||
namespace NB.Chat;
|
||||
|
||||
public class ChatChannelCenterComponentAwakeSystem : AwakeSystem<ChatChannelCenterComponent>
|
||||
{
|
||||
protected override void Awake(ChatChannelCenterComponent self)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
public class ChatChannelCenterComponentDestroySystem : DestroySystem<ChatChannelCenterComponent>
|
||||
{
|
||||
protected override void Destroy(ChatChannelCenterComponent self)
|
||||
{
|
||||
self.Channels.Clear();
|
||||
}
|
||||
}
|
||||
|
||||
public static class ChatChannelCenterComponentSystem
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取
|
||||
/// </summary>
|
||||
/// <param name="self"></param>
|
||||
/// <param name="channelId"></param>
|
||||
/// <param name="channel"></param>
|
||||
/// <returns></returns>
|
||||
public static bool TryGet(this ChatChannelCenterComponent self, long channelId, out ChatChannel? channel)
|
||||
{
|
||||
return self.Channels.TryGetValue(channelId, out channel);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 申请创建一个频道
|
||||
/// </summary>
|
||||
@@ -26,18 +54,6 @@ public static class ChatChannelCenterComponentSystem
|
||||
return channel;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取
|
||||
/// </summary>
|
||||
/// <param name="self"></param>
|
||||
/// <param name="channelId"></param>
|
||||
/// <param name="channel"></param>
|
||||
/// <returns></returns>
|
||||
public static bool TryGet(this ChatChannelCenterComponent self, long channelId, out ChatChannel? channel)
|
||||
{
|
||||
return self.Channels.TryGetValue(channelId, out channel);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 解散
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user