Files
SVSimServer/SVSim.BattleEngine/Engine/Wizard/SoftwareReset.cs
gamer147 957af3d1ec feat(battle-engine): full Unity/VFX/god-object shims + expanded copy closure (2570 files)
Authored Unity primitive/object-model shim, VFX layer (control-flow-preserving, InstantVfx never invokes its action -- headless suppression), god-object stubs (GameMgr/EffectMgr/UIManager with faithfully-extracted nested enums), View/UI/Touch tree, LitJson+BetterList+Tuple copied, third-party stubs. Discovered Roslyn header-error masking: fixing class-header type errors unmasks body references, so the true copy closure is ~2570 files (was 782 under masking). Errors: masked-25720 -> 268; our shim files compile clean. Remaining: ~50 residual shim/external types, 24 NGUI UI-base overrides, static-type fixes, plus likely 1-2 more unmask waves.
2026-06-05 17:22:20 -04:00

68 lines
1.7 KiB
C#

using Convention;
using Cute;
using UnityEngine;
using Wizard.RoomMatch;
namespace Wizard;
public static class SoftwareReset
{
private const float BGM_FADE_OUT_TIME = 1f;
private static string _bootScene;
private static void resetAction()
{
Data.Clear();
PaymentImpl.GetInstance().finalize();
GameObject gameObject = GameObject.Find("_GameMgr");
if (gameObject != null)
{
Object.Destroy(gameObject);
}
GameObject gameObject2 = GameObject.Find("_Game");
if (gameObject2 != null)
{
Object.Destroy(gameObject2);
}
BGMManager.Dispose();
Global.GAME_FONT = null;
Global.IS_LOAD_ALLDONE = false;
}
public static void setAction()
{
SoftwareResetBase.setSoftwareResetAction(resetAction);
}
public static void BgmFadeEndCallBack()
{
SoftwareResetBase.SoftwareReset(_bootScene, resetAction);
_bootScene = null;
}
public static void exec(string sceneName = null, bool isFromUserDelete = false)
{
UIManager.GetInstance().isBattleRecovery = false;
_bootScene = sceneName;
SoundMgr soundMgr = GameMgr.GetIns().GetSoundMgr();
soundMgr.StopBGM(BgmFadeEndCallBack, 1f);
soundMgr.StopSeAll(0f);
soundMgr.PlaySe(Se.TYPE.SYS_BTN_CANCEL_TRANS);
UIManager.GetInstance().CreatFadeClose();
VideoHostingUtil.OnSoftwareReset();
RoomBase.OnSoftwareReset();
Offline.OnSoftwareReset();
SealedController.OnSoftwareReset();
PlayerPrefsCache.OnSoftwareReset();
if (null != GameMgr.GetIns().GetBattleCtrl())
{
GameMgr.GetIns().GetBattleCtrl().BattleRelease();
}
if (BattleManagerBase.GetIns() != null)
{
BattleManagerBase.GetIns().DisposeBattleGameObj();
}
}
}