static void WaitWorld(NetworkData data)
 {
     var myName = data.LoadingData.AssemblyName + data.LoadingData.Level;
     while (Dispatcher.CurrentRunner == null ||
            Dispatcher.CurrentRunner.Name != myName ||
            Dispatcher.CurrentRunner.World == null)
         Thread.Sleep(5);
     data.World = Dispatcher.CurrentRunner.World;
 }
 static NetworkData MakeServerInfo(LoadingData data)
 {
     var networkInfo = new NetworkData
     {
         Port = UnityConstants.SoloNetworkPort,
         LoadingData = data,
         WaitWorld = WaitWorld
     };
     return networkInfo;
 }
Exemple #3
0
 static void ExecuteTest(string testName, ICvarcTest test, UnityAsserter asserter, NetworkData networkInfo)
 {
     try
     {
         test.Run(networkInfo, asserter);
         asserter.DebugOkMessage();
     }
     catch (Exception e)
     {
         asserter.Fail(e.GetType().Name + " " + e.Message);
     }
     lock (LastTestExecution)
     {
         LastTestExecution[testName] = !asserter.Failed;
     }
     Dispatcher.SetGameOver();
 }