Skip to content

Commit b4ea4bf

Browse files
committed
Replaced attribute fields with properties
1 parent 403e863 commit b4ea4bf

File tree

5 files changed

+6
-7
lines changed

5 files changed

+6
-7
lines changed

MLAPI/Attributes/ClientRpc.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ public class ClientRpc : Attribute
1111
/// <summary>
1212
/// The channelName to send this Rpc
1313
/// </summary>
14-
public string channelName = "MLAPI_INTERNAL";
14+
public string channelName { get; set; } = "MLAPI_INTERNAL";
1515
}
1616
}

MLAPI/Attributes/Command.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ public class Command : Attribute
1111
/// <summary>
1212
/// The channelName to send this Command
1313
/// </summary>
14-
public string channelName = "MLAPI_INTERNAL";
14+
public string channelName { get; set; } = "MLAPI_INTERNAL";
1515
}
1616
}

MLAPI/Attributes/SyncedVar.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ public class SyncedVar : Attribute
1111
/// <summary>
1212
/// The method name to invoke when the SyncVar get's updated.
1313
/// </summary>
14-
public string hookMethodName = string.Empty;
14+
public string hookMethodName { get; set; } = string.Empty;
1515
/// <summary>
1616
/// If true, the syncedVar will only be synced to the owner.
1717
/// </summary>
18-
public bool target = false;
18+
public bool target { get; set; }
1919
/// <summary>
2020
/// The delay for syncing this variable.
2121
/// </summary>
22-
public float syncDelay = 0.1f;
22+
public float syncDelay { get; set; } = 0.1f;
2323
/// <summary>
2424
/// Gets the time the Syncedvar was last synced
2525
/// </summary>

MLAPI/Attributes/TargetRpc.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ public class TargetRpc : Attribute
1111
/// <summary>
1212
/// The channelName to send this Target
1313
/// </summary>
14-
public string channelName = "MLAPI_INTERNAL";
14+
public string channelName { get; set; } = "MLAPI_INTERNAL";
1515
}
1616
}

MLAPI/MonoBehaviours/Core/NetworkedBehaviour.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ private void OnEnable()
7474
NetworkedObject.NetworkedBehaviours.Add(this);
7575
OnEnabled();
7676
}
77-
7877
internal bool networkedStartInvoked = false;
7978
/// <summary>
8079
/// Gets called when message handlers are ready to be registered and the networking is setup

0 commit comments

Comments
 (0)