大修改
This commit is contained in:
28
Hotfix/Social/System/ChatChannelSystem.cs
Normal file
28
Hotfix/Social/System/ChatChannelSystem.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using Fantasy;
|
||||
|
||||
namespace NB.Chat;
|
||||
|
||||
public static class ChatChannelSystem
|
||||
{
|
||||
/// <summary>
|
||||
/// 进入频道
|
||||
/// </summary>
|
||||
/// <param name="channel"></param>
|
||||
/// <param name="unit"></param>
|
||||
public static void Enter(this ChatChannel channel, SocialUnit unit)
|
||||
{
|
||||
channel.Units.Add(unit.Id);
|
||||
unit.CurrentChannel = channel.Id;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 离开频道
|
||||
/// </summary>
|
||||
/// <param name="channel"></param>
|
||||
/// <param name="unit"></param>
|
||||
public static void Exit(this ChatChannel channel, SocialUnit unit)
|
||||
{
|
||||
channel.Units.Remove(unit.Id);
|
||||
unit.CurrentChannel = 0;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user