// Copyright (c) Wojciech Figat. All rights reserved. using System; using FlaxEngine.Networking; namespace FlaxEngine { /// /// Indicates that a method is Remote Procedure Call which can be invoked on client and executed on server or invoked on server and executed on clients. /// [AttributeUsage(AttributeTargets.Method)] public sealed class NetworkRpcAttribute : Attribute { /// /// True if RPC should be executed on server. /// public bool Server; /// /// True if RPC should be executed on client. /// public bool Client; /// /// Network channel using which RPC should be send. /// public NetworkChannelType Channel; /// /// Initializes a new instance of the class. /// /// True if RPC should be executed on server. /// True if RPC should be executed on client. /// Network channel using which RPC should be send. public NetworkRpcAttribute(bool server = false, bool client = false, NetworkChannelType channel = NetworkChannelType.ReliableOrdered) { Server = server; Client = client; Channel = channel; } } }