This commit is contained in:
CortexCore
2024-06-08 10:07:40 +08:00
parent ccc9957809
commit b9731c20a1
11 changed files with 231 additions and 44 deletions

View File

@@ -89,15 +89,9 @@ namespace BITKit.Net
_netProviderImplementation.ClientCommand(id, command);
}
public UniTask<T> GetFromServer<T>(string addressablePath = Constant.System.Internal)
{
return _netProviderImplementation.GetFromServer<T>(addressablePath);
}
public UniTask<T> GetFromServer<T>(T command = default)=>_netProviderImplementation.GetFromServer<T>(command);
public UniTask<T> GetFromClient<T>(int id, string addressablePath = Constant.System.Internal)
{
return _netProviderImplementation.GetFromClient<T>(id, addressablePath);
}
public UniTask<T> GetFromClient<T>(int id, T command = default)=>_netProviderImplementation.GetFromClient(id, command);
public void AddRpcHandle(object rpcHandle)
{
@@ -109,11 +103,15 @@ namespace BITKit.Net
_netProviderImplementation.AddCommandListener(handle);
}
public void RemoveCommandListener<T>(Action<T> handle)
public void AddCommandListener<T>(Func<T, T> func)
{
_netProviderImplementation.RemoveCommandListener(handle);
throw new NotImplementedException();
}
public void RemoveCommandListener<T>(Func<T, T> func)
{
throw new NotImplementedException();
}
public void SendRT(string rpcName, params object[] pars)
{
_netProviderImplementation.SendRT(rpcName, pars);