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.
94 lines
1.9 KiB
C#
94 lines
1.9 KiB
C#
using System.Collections;
|
|
using UnityEngine;
|
|
using Wizard;
|
|
|
|
namespace Cute;
|
|
|
|
public class BootNetwork : MonoBehaviour
|
|
{
|
|
public bool _autoSetup;
|
|
|
|
public static bool IsDoneLanguageSetting;
|
|
|
|
public bool IsDoneGameStartCheck { get; set; }
|
|
|
|
private void Awake()
|
|
{
|
|
Object.DontDestroyOnLoad(base.gameObject);
|
|
}
|
|
|
|
private IEnumerator Start()
|
|
{
|
|
while (Toolbox.BootSystem == null)
|
|
{
|
|
yield return 0;
|
|
}
|
|
while (Toolbox.NetworkManager == null)
|
|
{
|
|
yield return 0;
|
|
}
|
|
Toolbox.BootNetwork = this;
|
|
if (_autoSetup)
|
|
{
|
|
SetupNetwork();
|
|
}
|
|
SetupNetworkLanguage();
|
|
while (!IsDoneLanguageSetting)
|
|
{
|
|
yield return 0;
|
|
}
|
|
}
|
|
|
|
private void OnDestroy()
|
|
{
|
|
}
|
|
|
|
public void SetupNetwork()
|
|
{
|
|
if (!IsDoneGameStartCheck)
|
|
{
|
|
StartCoroutine(SetupNetworkCoroutine());
|
|
}
|
|
}
|
|
|
|
public void SetupNetworkLanguage()
|
|
{
|
|
string text = Toolbox.SavedataManager.GetString("LANG_SETTING");
|
|
if (text == "Jpn")
|
|
{
|
|
Toolbox.SavedataManager.DeleteKey("LANG_SETTING");
|
|
Toolbox.SavedataManager.DeleteKey("LANG_SOUND_SETTING");
|
|
text = "";
|
|
Toolbox.AssetManager.ClearAllAssetFile();
|
|
Toolbox.AssetManager.ClearAssetCacheAssetBundle();
|
|
}
|
|
if (string.IsNullOrEmpty(text))
|
|
{
|
|
CustomPreference.SetScemeMode(CustomPreference.eSchemeType.Https);
|
|
CustomPreference.SetApplicationServerURL("utoongaize.shadowverse.jp/shadowverse/");
|
|
}
|
|
else
|
|
{
|
|
IsDoneLanguageSetting = true;
|
|
}
|
|
}
|
|
|
|
private IEnumerator SetupNetworkCoroutine()
|
|
{
|
|
if (!IsDoneGameStartCheck)
|
|
{
|
|
yield return StartCoroutine(Toolbox.NetworkManager._certification.Login());
|
|
}
|
|
}
|
|
|
|
public IEnumerator SetupNetworkCertification()
|
|
{
|
|
SetupNetwork();
|
|
while (!IsDoneGameStartCheck)
|
|
{
|
|
yield return 0;
|
|
}
|
|
yield return StartCoroutine(Toolbox.AssetManager.InitializeManifest(null, Data.Load.data._userTutorial.tutorial_step != 100));
|
|
}
|
|
}
|