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

@@ -103,14 +103,19 @@ namespace BITKit.Net
_netProviderImplementation.AddCommandListener(handle);
}
public void AddCommandListener<T>(Func<T, T> func)
public void RemoveCommandListener<T>(Action<T> handle)
{
throw new NotImplementedException();
_netProviderImplementation.RemoveCommandListener(handle);
}
public void RemoveCommandListener<T>(Func<T, T> func)
public void AddCommandListener<T>(Func<T, UniTask<T>> func)
{
throw new NotImplementedException();
_netProviderImplementation.AddCommandListener(func);
}
public void RemoveCommandListener<T>(Func<T, UniTask<T>> func)
{
_netProviderImplementation.RemoveCommandListener(func);
}
public void SendRT(string rpcName, params object[] pars)
{
@@ -189,6 +194,11 @@ namespace BITKit.Net
{
_netServerImplementation1.AddCommandListenerWithId(handle);
}
public void KickClient(int id)
{
_netServerImplementation1.KickClient(id);
}
}
public class GameNetProvider : MonoBehaviour