This commit is contained in:
CortexCore
2024-06-08 15:12:48 +08:00
parent b9731c20a1
commit 3e8bd54a08
9 changed files with 155 additions and 182 deletions

View File

@@ -74,7 +74,12 @@ namespace BITKit.Net.Kcp
{
_netServerImplementation.AddCommandListenerWithId(handle);
}
public void KickClient(int id)
{
_netServerImplementation.KickClient(id);
}
[BIT]
private void EditorStartServer()
{
@@ -127,12 +132,12 @@ namespace BITKit.Net.Kcp
_server.AddCommandListener(handle);
}
public void AddCommandListener<T>(Func<T, T> func)
public void AddCommandListener<T>(Func<T,UniTask<T>> func)
{
_serverInstance.AddCommandListener(func);
}
public void RemoveCommandListener<T>(Func<T, T> func)
public void RemoveCommandListener<T>(Func<T,UniTask<T>> func)
{
_serverInstance.RemoveCommandListener(func);
}