1
This commit is contained in:
@@ -108,16 +108,15 @@ namespace BITKit.Net.Kcp
|
||||
_server.ClientCommand(id, command);
|
||||
}
|
||||
|
||||
public UniTask<T> GetFromServer<T>(string addressablePath = Constant.System.Internal)
|
||||
public UniTask<T> GetFromServer<T>(T command = default)
|
||||
{
|
||||
return _server.GetFromServer<T>(addressablePath);
|
||||
return _serverInstance.GetFromServer(command);
|
||||
}
|
||||
|
||||
public UniTask<T> GetFromClient<T>(int id, string addressablePath = Constant.System.Internal)
|
||||
public UniTask<T> GetFromClient<T>(int id, T command = default)
|
||||
{
|
||||
return _server.GetFromClient<T>(id, addressablePath);
|
||||
return _serverInstance.GetFromClient(id, command);
|
||||
}
|
||||
|
||||
public void AddRpcHandle(object rpcHandle)
|
||||
{
|
||||
_server.AddRpcHandle(rpcHandle);
|
||||
@@ -128,6 +127,16 @@ namespace BITKit.Net.Kcp
|
||||
_server.AddCommandListener(handle);
|
||||
}
|
||||
|
||||
public void AddCommandListener<T>(Func<T, T> func)
|
||||
{
|
||||
_serverInstance.AddCommandListener(func);
|
||||
}
|
||||
|
||||
public void RemoveCommandListener<T>(Func<T, T> func)
|
||||
{
|
||||
_serverInstance.RemoveCommandListener(func);
|
||||
}
|
||||
|
||||
public void RemoveCommandListener<T>(Action<T> handle)
|
||||
{
|
||||
_server.RemoveCommandListener(handle);
|
||||
|
Reference in New Issue
Block a user