mirror of
https://github.com/NuclearPowered/Reactor.git
synced 2026-10-19 15:51:54 +00:00
Make CustomRpc api more generic, PlayerColor enum, bug fixes in RegisterInIl2CppAttribute
This commit is contained in:
12 files changed
+230
-84
No files matched your search
@@ -38,8 +38,8 @@ namespace Reactor.Example
|
||||
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"));
|
||||
Rpc<ExampleRpc>.Instance.Send(new ExampleRpc.Data("Cześć :)"));
|
||||
Rpc<ExampleRpc>.Instance.SendTo(AmongUsClient.Instance.HostId, new ExampleRpc.Data("host :O"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ using Hazel;
|
||||
namespace Reactor.Example
|
||||
{
|
||||
[RegisterCustomRpc]
|
||||
public class ExampleRpc : CustomRpc<ExamplePlugin, PlayerControl, ExampleRpc.Data>
|
||||
public class ExampleRpc : PlayerCustomRpc<ExamplePlugin, ExampleRpc.Data>
|
||||
{
|
||||
public ExampleRpc(ExamplePlugin plugin) : base(plugin)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user