UNetInvokeType moved to UNetwork.cs so that NetworkBehaviour is less cluttered and so that it can be used from other classes more easily.

This commit is contained in:
vis2k 2018-12-30 18:16:58 +01:00
parent 5bf7244533
commit 4c2fdc51bf
2 changed files with 8 additions and 7 deletions

View File

@ -186,13 +186,6 @@ public virtual bool InvokeSyncEvent(int cmdHash, NetworkReader reader)
public delegate void CmdDelegate(NetworkBehaviour obj, NetworkReader reader);
public enum UNetInvokeType
{
Command,
ClientRpc,
SyncEvent
}
protected class Invoker
{
public UNetInvokeType invokeType;

View File

@ -12,6 +12,14 @@ namespace Mirror
// Handles requests to unspawn objects on the client
public delegate void UnSpawnDelegate(GameObject spawned);
// invoke type for Cmd/Rpc/SyncEvents
public enum UNetInvokeType
{
Command,
ClientRpc,
SyncEvent
}
// built-in system network messages
// original HLAPI uses short, so let's keep short to not break packet header etc.
// => use .ToString() to get the field name from the field value