using MLAPI.Transports;
namespace MLAPI.NetworkVariable
{
///
/// Delegate type for permission checking
///
/// The clientId whose permissions to check
public delegate bool NetworkVariablePermissionsDelegate(ulong clientId);
///
/// The settings class used by the build in NetworkVar implementations
///
public class NetworkVariableSettings
{
///
/// Defines the write permissions for this var
///
public NetworkVariablePermission WritePermission = NetworkVariablePermission.ServerOnly;
///
/// Defines the read permissions for this var
///
public NetworkVariablePermission ReadPermission = NetworkVariablePermission.Everyone;
///
/// The delegate used to evaluate write permission when the "Custom" mode is used
///
public NetworkVariablePermissionsDelegate WritePermissionCallback = null;
///
/// The delegate used to evaluate read permission when the "Custom" mode is used
///
public NetworkVariablePermissionsDelegate ReadPermissionCallback = null;
///
/// The maximum times per second this var will be synced.
/// A value of 0 will cause the variable to sync as soon as possible after being changed.
/// A value of less than 0 will cause the variable to sync only at once at spawn and not update again.
///
public float SendTickrate = 0;
///
/// The name of the channel to use for this variable.
/// Variables with different channels will be split into different packets
///
public NetworkChannel SendNetworkChannel = NetworkChannel.DefaultMessage;
///
/// Constructs a new NetworkVariableSettings instance
///
public NetworkVariableSettings() { }
}
}