mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 11:00:32 +00:00
Weaver: GetSyncVarStart simplified
This commit is contained in:
parent
e755c2ad9a
commit
9f4cf44217
@ -19,12 +19,8 @@ public class SyncVarAccessLists
|
||||
// amount of SyncVars per class. dict<className, amount>
|
||||
public Dictionary<string, int> numSyncVars = new Dictionary<string, int>();
|
||||
|
||||
public int GetSyncVarStart(string className)
|
||||
{
|
||||
return numSyncVars.ContainsKey(className)
|
||||
? numSyncVars[className]
|
||||
: 0;
|
||||
}
|
||||
public int GetSyncVarStart(string className) =>
|
||||
numSyncVars.TryGetValue(className, out int value) ? value : 0;
|
||||
|
||||
public void SetNumSyncVars(string className, int num)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user