mirror of
https://github.com/NuclearPowered/Reactor.git
synced 2026-10-19 15:51:54 +00:00
CustomRpc SendTo
This commit is contained in:
4 files changed
+15
-4
No files matched your search
@@ -35,10 +35,11 @@ namespace Reactor.Example
|
||||
|
||||
private void Update()
|
||||
{
|
||||
if (Input.GetKeyDown(KeyCode.F3))
|
||||
if (Input.GetKeyDown(KeyCode.F3) && AmongUsClient.Instance && PlayerControl.LocalPlayer)
|
||||
{
|
||||
Plugin.Log.LogWarning("Sending example rpc");
|
||||
PlayerControl.LocalPlayer.Send<ExampleRpc>(new ExampleRpc.Data("Cześć :)"));
|
||||
PlayerControl.LocalPlayer.SendTo<ExampleRpc>(AmongUsClient.Instance.HostId, new ExampleRpc.Data("host :O"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace Reactor.Example
|
||||
}
|
||||
}
|
||||
|
||||
public override RpcLocalHandling LocalHandling => RpcLocalHandling.Before;
|
||||
public override RpcLocalHandling LocalHandling => RpcLocalHandling.None;
|
||||
|
||||
public override void Write(MessageWriter writer, Data data)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user