Ejemplo n.º 1
0
 public static void Reload(Engine.ReloadState reloadState)
 {
     if (reloadState == Engine.ReloadState.None)
     {
         return;
     }
     if (reloadState == Engine.ReloadState.Managed)
     {
         Engine.Reloading = true;
         MainForm.Instance.CloseSaveConfirmed = true;
         MainForm.Instance.Close();
         Binding.UnloadDll();
         return;
     }
     if (reloadState == Engine.ReloadState.Native)
     {
         Engine.Reloading = true;
         MainForm.Instance.CloseSaveConfirmed = true;
         MainForm.Instance.Close();
         Binding.FCE_Editor_Destroy();
         Binding.UnloadDll();
         Binding.UnloadIGEDll();
         File.Copy(Engine.BinDir + "output\\" + Binding.gameDll, Engine.BinDir + Binding.gameDll, true);
         string text = Path.ChangeExtension(Binding.gameDll, ".pdb");
         File.Copy(Engine.BinDir + "output\\" + text, Engine.BinDir + text, true);
         Binding.LoadIGEDll();
         Binding.LoadDll();
         Binding.FCE_Editor_Create(true);
         Binding.UnloadDll();
     }
 }
Ejemplo n.º 2
0
 public static void Invoke(Engine.InvokeDelegate callback)
 {
     List<Engine.InvokeDelegate> delayedCallbacks;
     Monitor.Enter(delayedCallbacks = Engine.m_delayedCallbacks);
     try
     {
         Engine.m_delayedCallbacks.Add(callback);
     }
     finally
     {
         Monitor.Exit(delayedCallbacks);
     }
 }