This commit is contained in:
vis2k 2021-08-07 12:55:49 +08:00
parent 3bb95aa528
commit a34b974580

View File

@ -9,26 +9,19 @@ class VirtualClientRpc : NetworkBehaviour
public event Action<int> onVirtualSendInt;
[ClientRpc]
public virtual void RpcSendInt(int someInt)
{
public virtual void RpcSendInt(int someInt) =>
onVirtualSendInt?.Invoke(someInt);
}
}
class VirtualNoOverrideClientRpc : VirtualClientRpc
{
}
class VirtualNoOverrideClientRpc : VirtualClientRpc {}
class VirtualOverrideClientRpc : VirtualClientRpc
{
public event Action<int> onOverrideSendInt;
[ClientRpc]
public override void RpcSendInt(int someInt)
{
public override void RpcSendInt(int someInt) =>
onOverrideSendInt?.Invoke(someInt);
}
}
class VirtualOverrideClientRpcWithBase : VirtualClientRpc