From ca7d572908c58c587214b8f65bdd4078d0185ab2 Mon Sep 17 00:00:00 2001 From: Fabio Alessandrelli Date: Tue, 12 Jul 2022 23:12:42 +0200 Subject: [Net] Modularize multiplayer, expose MultiplayerAPI to extensions. - RPC configurations are now dictionaries. - Script.get_rpc_methods renamed to Script.get_rpc_config. - Node.rpc[_id] and Callable.rpc now return an Error. - Refactor MultiplayerAPI to allow extension. - New MultiplayerAPI.rpc method with Array argument (for scripts). - Move the default MultiplayerAPI implementation to a module. --- .../glue/GodotSharp/GodotSharp/Core/Attributes/RPCAttribute.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'modules/mono/glue') diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Attributes/RPCAttribute.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Attributes/RPCAttribute.cs index 0a1c8322d7..fb37838ffa 100644 --- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Attributes/RPCAttribute.cs +++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Attributes/RPCAttribute.cs @@ -5,8 +5,8 @@ namespace Godot /// /// Attribute that changes the RPC mode for the annotated method to the given , /// optionally specifying the and (on supported peers). - /// See and . By default, methods are not exposed to networking - /// (and RPCs). + /// See and . + /// By default, methods are not exposed to networking (and RPCs). /// [AttributeUsage(AttributeTargets.Method, AllowMultiple = false)] public class RPCAttribute : Attribute @@ -14,7 +14,7 @@ namespace Godot /// /// RPC mode for the annotated method. /// - public RPCMode Mode { get; } = RPCMode.Disabled; + public MultiplayerAPI.RPCMode Mode { get; } = MultiplayerAPI.RPCMode.Disabled; /// /// If the method will also be called locally; otherwise, it is only called remotely. @@ -24,7 +24,7 @@ namespace Godot /// /// Transfer mode for the annotated method. /// - public TransferMode TransferMode { get; set; } = TransferMode.Reliable; + public MultiplayerPeer.TransferModeEnum TransferMode { get; set; } = MultiplayerPeer.TransferModeEnum.Reliable; /// /// Transfer channel for the annotated mode. @@ -35,7 +35,7 @@ namespace Godot /// Constructs a instance. /// /// The RPC mode to use. - public RPCAttribute(RPCMode mode = RPCMode.Authority) + public RPCAttribute(MultiplayerAPI.RPCMode mode = MultiplayerAPI.RPCMode.Authority) { Mode = mode; } -- cgit v1.2.3