mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 11:00:32 +00:00
remove privates
This commit is contained in:
parent
0187b2082f
commit
267827b15a
@ -107,8 +107,8 @@ protected void DrawDefaultSyncSettings()
|
||||
}
|
||||
public class SyncListDrawer
|
||||
{
|
||||
private readonly UnityEngine.Object targetObject;
|
||||
private readonly List<SyncListField> syncListFields;
|
||||
readonly UnityEngine.Object targetObject;
|
||||
readonly List<SyncListField> syncListFields;
|
||||
|
||||
public SyncListDrawer(UnityEngine.Object targetObject)
|
||||
{
|
||||
|
@ -159,7 +159,7 @@ static void OnCompilationFinished(string assemblyPath, CompilerMessage[] message
|
||||
}
|
||||
}
|
||||
|
||||
private static HashSet<string> GetDependecyPaths(string assemblyPath)
|
||||
static HashSet<string> GetDependecyPaths(string assemblyPath)
|
||||
{
|
||||
// build directory list for later asm/symbol resolving using CompilationPipeline refs
|
||||
HashSet<string> dependencyPaths = new HashSet<string>();
|
||||
|
@ -91,7 +91,7 @@ static void GenerateSerialization(TypeDefinition td)
|
||||
}
|
||||
}
|
||||
|
||||
private static void CallWriter(ILProcessor serWorker, FieldDefinition field)
|
||||
static void CallWriter(ILProcessor serWorker, FieldDefinition field)
|
||||
{
|
||||
MethodReference writeFunc = Writers.GetWriteFunc(field.FieldType);
|
||||
if (writeFunc != null)
|
||||
@ -107,7 +107,7 @@ private static void CallWriter(ILProcessor serWorker, FieldDefinition field)
|
||||
}
|
||||
}
|
||||
|
||||
private static void CallBase(TypeDefinition td, ILProcessor serWorker, string name)
|
||||
static void CallBase(TypeDefinition td, ILProcessor serWorker, string name)
|
||||
{
|
||||
MethodReference method = Resolvers.ResolveMethodInParents(td.BaseType, Weaver.CurrentAssembly, name);
|
||||
if (method != null)
|
||||
@ -172,7 +172,7 @@ static void GenerateDeSerialization(TypeDefinition td)
|
||||
}
|
||||
}
|
||||
|
||||
private static void CallReader(ILProcessor serWorker, FieldDefinition field)
|
||||
static void CallReader(ILProcessor serWorker, FieldDefinition field)
|
||||
{
|
||||
MethodReference readerFunc = Readers.GetReadFunc(field.FieldType);
|
||||
if (readerFunc != null)
|
||||
|
@ -26,7 +26,7 @@ public static MethodDefinition GetHookMethod(TypeDefinition td, FieldDefinition
|
||||
return GetHookMethod(td, syncVar, hookFunctionName);
|
||||
}
|
||||
|
||||
private static MethodDefinition GetHookMethod(TypeDefinition td, FieldDefinition syncVar, string hookFunctionName)
|
||||
static MethodDefinition GetHookMethod(TypeDefinition td, FieldDefinition syncVar, string hookFunctionName)
|
||||
{
|
||||
MethodDefinition m = td.GetMethod(hookFunctionName);
|
||||
if (m != null)
|
||||
|
@ -340,7 +340,7 @@ static MethodDefinition GenerateClassOrStructReadFunction(TypeReference variable
|
||||
}
|
||||
|
||||
// Initialize the local variable with a new instance
|
||||
private static void CreateNew(TypeReference variable, ILProcessor worker, TypeDefinition td)
|
||||
static void CreateNew(TypeReference variable, ILProcessor worker, TypeDefinition td)
|
||||
{
|
||||
if (variable.IsValueType)
|
||||
{
|
||||
@ -373,7 +373,7 @@ private static void CreateNew(TypeReference variable, ILProcessor worker, TypeDe
|
||||
}
|
||||
}
|
||||
|
||||
private static void DeserializeFields(TypeReference variable, int recursionCount, ILProcessor worker)
|
||||
static void DeserializeFields(TypeReference variable, int recursionCount, ILProcessor worker)
|
||||
{
|
||||
uint fields = 0;
|
||||
foreach (FieldDefinition field in variable.Resolve().Fields)
|
||||
|
@ -526,7 +526,7 @@ static bool Weave(string assName, IEnumerable<string> dependencies, string unity
|
||||
return true;
|
||||
}
|
||||
|
||||
private static bool WeaveModule(ModuleDefinition moduleDefinition)
|
||||
static bool WeaveModule(ModuleDefinition moduleDefinition)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
@ -33,7 +33,7 @@ public override void OnClientConnect(NetworkConnection conn)
|
||||
conn.Send(new CreatePlayerMessage { name = PlayerName });
|
||||
}
|
||||
|
||||
private void OnCreatePlayer(NetworkConnection connection, CreatePlayerMessage createPlayerMessage)
|
||||
void OnCreatePlayer(NetworkConnection connection, CreatePlayerMessage createPlayerMessage)
|
||||
{
|
||||
// create a gameobject using the name supplied by client
|
||||
GameObject playergo = Instantiate(playerPrefab);
|
||||
|
@ -15,7 +15,7 @@ public void Awake()
|
||||
Player.OnMessage += OnPlayerMessage;
|
||||
}
|
||||
|
||||
private void OnPlayerMessage(Player player, string message)
|
||||
void OnPlayerMessage(Player player, string message)
|
||||
{
|
||||
string prettyMessage = player.isLocalPlayer ?
|
||||
$"<color=red>{player.playerName}: </color> {message}" :
|
||||
|
@ -8,17 +8,17 @@ namespace Mirror.Tests
|
||||
{
|
||||
public class NetworkMatchCheckerTest
|
||||
{
|
||||
private GameObject player1;
|
||||
private GameObject player2;
|
||||
private GameObject player3;
|
||||
private NetworkMatchChecker player1MatchChecker;
|
||||
private NetworkMatchChecker player2MatchChecker;
|
||||
private NetworkConnection player1Connection;
|
||||
private NetworkConnection player2Connection;
|
||||
private NetworkConnection player3Connection;
|
||||
private GameObject transportGO;
|
||||
GameObject player1;
|
||||
GameObject player2;
|
||||
GameObject player3;
|
||||
NetworkMatchChecker player1MatchChecker;
|
||||
NetworkMatchChecker player2MatchChecker;
|
||||
NetworkConnection player1Connection;
|
||||
NetworkConnection player2Connection;
|
||||
NetworkConnection player3Connection;
|
||||
GameObject transportGO;
|
||||
static int nextConnectionId;
|
||||
private Dictionary<Guid, HashSet<NetworkIdentity>> matchPlayers;
|
||||
Dictionary<Guid, HashSet<NetworkIdentity>> matchPlayers;
|
||||
|
||||
[SetUp]
|
||||
public void Setup()
|
||||
@ -41,7 +41,7 @@ public void Setup()
|
||||
matchPlayers = g;
|
||||
}
|
||||
|
||||
private static Dictionary<Guid, HashSet<NetworkIdentity>> GetMatchPlayersDictionary()
|
||||
static Dictionary<Guid, HashSet<NetworkIdentity>> GetMatchPlayersDictionary()
|
||||
{
|
||||
Type type = typeof(NetworkMatchChecker);
|
||||
FieldInfo fieldInfo = type.GetField("matchPlayers", BindingFlags.Static | BindingFlags.NonPublic);
|
||||
|
@ -47,10 +47,10 @@ public override void onValue2Changed(float old, float newValue)
|
||||
[TestFixture]
|
||||
public class SyncVarVirtualTest
|
||||
{
|
||||
private SyncVarHookTester serverTester;
|
||||
private NetworkIdentity netIdServer;
|
||||
private SyncVarHookTester clientTester;
|
||||
private NetworkIdentity netIdClient;
|
||||
SyncVarHookTester serverTester;
|
||||
NetworkIdentity netIdServer;
|
||||
SyncVarHookTester clientTester;
|
||||
NetworkIdentity netIdClient;
|
||||
|
||||
[SetUp]
|
||||
public void Setup()
|
||||
@ -71,7 +71,7 @@ public void Setup()
|
||||
SyncValuesWithClient();
|
||||
}
|
||||
|
||||
private void SyncValuesWithClient()
|
||||
void SyncValuesWithClient()
|
||||
{
|
||||
// serialize all the data as we would for the network
|
||||
NetworkWriter ownerWriter = new NetworkWriter();
|
||||
|
@ -9,7 +9,7 @@ namespace Mirror.Tests.Performance
|
||||
[Category("Benchmark")]
|
||||
public class NetworkIdentityPerformanceWithMultipleBehaviour
|
||||
{
|
||||
private const int healthCount = 32;
|
||||
const int healthCount = 32;
|
||||
GameObject gameObject;
|
||||
NetworkIdentity identity;
|
||||
Health[] health;
|
||||
|
Loading…
Reference in New Issue
Block a user