NetworkConnection

This commit is contained in:
Chris Langsenkamp 2019-07-29 12:49:21 -04:00
parent 5d860786ae
commit e76a41011d

View File

@ -162,6 +162,9 @@ internal void SetHandlers(Dictionary<int, NetworkMessageDelegate> handlers)
messageHandlers = handlers;
}
/// <summary>
/// Obsolete: Use NetworkClient/NetworkServer.RegisterHandler<T> instead
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never), Obsolete("Use NetworkClient/NetworkServer.RegisterHandler<T> instead")]
public void RegisterHandler(short msgType, NetworkMessageDelegate handler)
{
@ -172,12 +175,18 @@ public void RegisterHandler(short msgType, NetworkMessageDelegate handler)
messageHandlers[msgType] = handler;
}
/// <summary>
/// Obsolete: Use NetworkClient/NetworkServer.UnregisterHandler<T> instead
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never), Obsolete("Use NetworkClient/NetworkServer.UnregisterHandler<T> instead")]
public void UnregisterHandler(short msgType)
{
messageHandlers.Remove(msgType);
}
/// <summary>
/// Obsolete: use Send<T> instead
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never), Obsolete("use Send<T> instead")]
public virtual bool Send(int msgType, MessageBase msg, int channelId = Channels.DefaultReliable)
{
@ -255,6 +264,9 @@ internal void RemoveObservers()
visList.Clear();
}
/// <summary>
/// Obsolete: Use InvokeHandler<T> instead
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never), Obsolete("Use InvokeHandler<T> instead")]
public bool InvokeHandlerNoData(int msgType)
{