This commit is contained in:
vis2k 2021-08-07 13:12:21 +08:00
parent 79fc5f528e
commit 35b024197a

View File

@ -9,26 +9,19 @@ class VirtualCommand : NetworkBehaviour
public event Action<int> onVirtualSendInt;
[Command]
public virtual void CmdSendInt(int someInt)
{
public virtual void CmdSendInt(int someInt) =>
onVirtualSendInt?.Invoke(someInt);
}
}
class VirtualNoOverrideCommand : VirtualCommand
{
}
class VirtualNoOverrideCommand : VirtualCommand {}
class VirtualOverrideCommand : VirtualCommand
{
public event Action<int> onOverrideSendInt;
[Command]
public override void CmdSendInt(int someInt)
{
public override void CmdSendInt(int someInt) =>
onOverrideSendInt?.Invoke(someInt);
}
}
class VirtualOverrideCommandWithBase : VirtualCommand