Files
SVSimServer/SVSim.BattleEngine/Engine/Cute/BootApp.cs
gamer147 824309ec44 feat(battle-engine): close the AI-simulation subsystem (verbatim)
Copied the 89 uncopied AI*SimulationUtility/extension files defining the
AIVirtualCard/AIVirtualField extension methods; the compile loop then auto-closed
the revealed type deps (~3049 files total, drift-clean). 10.0k -> 62 errors.
2026-06-05 20:30:59 -04:00

76 lines
1.7 KiB
C#

using System.Collections;
using System.Globalization;
using System.Threading;
using UnityEngine;
using Wizard;
namespace Cute;
public class BootApp : MonoBehaviour
{
public static string BootScene;
private Coroutine _logCoroutine;
private string _logMsg = "";
private IEnumerator Start()
{
_logCoroutine = StartCoroutine(WaitToAccumulateTraceLog());
_logMsg += "start";
createMutex();
restrainOSXProcess();
startSteamClient();
while (Toolbox.BootSystem == null)
{
yield return 0;
}
_logMsg += "start2";
CultureInfo.DefaultThreadCurrentUICulture = (CultureInfo.DefaultThreadCurrentCulture = new CultureInfo("ja-JP", useUserOverride: false));
Toolbox.AssetManager.createSavePath();
yield return StartCoroutine(FontChanger.FontTryChangePersistant(null));
_logMsg += "start3";
_logMsg += "start4";
StopCoroutine(_logCoroutine);
changeScene();
}
private IEnumerator WaitToAccumulateTraceLog()
{
yield return new WaitForSeconds(5f);
LocalLog.AccumulateTraceInquiryLog("BootApp " + _logMsg);
}
private void createMutex()
{
Toolbox.mute = new Mutex(initiallyOwned: false, "Global\\ShadowversePcPlatformGlobalThread");
if (Toolbox.mute != null && !Toolbox.mute.WaitOne(0, exitContext: false))
{
Toolbox.mute.Close();
Toolbox.mute = null;
Application.Quit();
}
}
private void startSteamClient()
{
_ = SteamManager.Initialized;
}
private void restrainOSXProcess()
{
}
private void changeScene()
{
if (BootScene != null)
{
Toolbox.SceneManager.ChangeScene(BootScene);
}
else
{
Toolbox.SceneManager.ChangeScene(SceneType._Splash);
}
}
}