GameMgr (managers/setting/flags), UIManager (GetInstance + scene/dialog/loading surface), EffectMgr (Start/effect lifecycle), VfxMgr + VfxWithLoading(Sequential) register methods -- signatures mirrored from decomp. 15.9k -> 10.0k errors.
210 lines
11 KiB
C#
210 lines
11 KiB
C#
// AUTHORED SHIM (not copied). The god-object singletons the engine reaches for
|
|
// presentation/scene/effects/sound/data. These are the M0 "stop the bleed" types:
|
|
// copying them re-explodes the closure into the whole app (audio, scene, UI, net),
|
|
// so we shim a minimal surface. Manager GETTERS return the (copied) manager types as
|
|
// null fields -- the engine only dereferences them inside never-run VFX (IsForecast
|
|
// suppresses VFX) or non-battle code paths, so a null is harmless headless and avoids
|
|
// constructing copied types with heavy ctors. Member signatures mirror the decomp
|
|
// exactly (extracted, not guessed) so call sites compile unchanged.
|
|
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class EffectMgr
|
|
{
|
|
public enum EffectType
|
|
{
|
|
NONE,
|
|
CMN_CARD_ACCELERATE_1, CMN_CARD_CRYSTALLIZE_1, CMN_CARD_SELECT_3,
|
|
CMN_CARD_SET_1, CMN_CARD_SET_2, CMN_CARD_SET_3,
|
|
CMN_CARD_TARGET_1, CMN_CARD_TARGET_2,
|
|
CMN_CRAFT_CARD_1, CMN_CRAFT_CARD_2, CMN_CRAFT_ICON_1,
|
|
CMN_CRAFT_SPLASH_1, CMN_CRAFT_SPLASH_2, CMN_CRAFT_SPLASH_3, CMN_CRAFT_SPLASH_4,
|
|
CMN_CRAFT_TRACK_1, CMN_FRAME_BTN_1, CMN_FRAME_BTN_2,
|
|
CMN_GACHA_CURSOR_1, CMN_GACHA_OPEN_2, CMN_GACHA_OPEN_3, CMN_GACHA_OPEN_4,
|
|
CMN_INPUT_DRAG_1, CMN_INPUT_TOUCH_1, CMN_INPUT_TOUCH_2,
|
|
CMN_RESULT_BACK_1, CMN_RESULT_BACK_2, CMN_RESULT_BACK_3,
|
|
CMN_RESULT_FAILED_1, CMN_RESULT_GAUGE_1, CMN_RESULT_GAUGE_2,
|
|
CMN_RESULT_LVUP_1, CMN_RESULT_MATCH_1, CMN_RESULT_ORB_1, CMN_RESULT_ORB_2,
|
|
CMN_RESULT_RANKDOWN_1, CMN_RESULT_RANKUP_1, CMN_RESULT_TIERUP_1,
|
|
CMN_START_CARD_1, CMN_START_VS_1, CMN_START_VS_ST2,
|
|
CMN_UI_TURN_1, CMN_UI_TURN_5, CMN_UI_TURN_6, CMN_CLASS_APPEAR_1,
|
|
}
|
|
public enum MoveType { NONE, DIRECT, DIRECT_HAND, DIRECT_LEADER }
|
|
public enum TargetType { NONE, NONE_WAIT, SINGLE, SINGLE_ONLY_OPPONENT, AREA_ALL, AREA_OPPONENT, AREA_SELF }
|
|
public enum EngineType { NONE, SHURIKEN, SOLID }
|
|
|
|
public GameObject EffectContainer => null;
|
|
public bool IsPlayerBattleEffectReady => true;
|
|
public bool IsEnemyBattleEffectReady => true;
|
|
public bool IsPreInEffectReady => true;
|
|
public bool IsFieldEffectReady => true;
|
|
public bool IsBattleUIEffectReady => true;
|
|
|
|
public Effect Start(EffectType type, Vector3 pos, Quaternion rot, int layer = -1) => null;
|
|
public Effect Start(EffectType type, Vector3 pos, GameObject obj = null) => null;
|
|
public Effect Start(EffectType type, float posX, float posY) => null;
|
|
public Effect Start(EffectType type) => null;
|
|
public Effect StartTouchEffect(EffectType type, float posX, float posY) => null;
|
|
public Effect StartBuff(EffectType type, GameObject obj) => null;
|
|
public Effect StartBuffLookAt(EffectType type, GameObject fromObject, GameObject toObject) => null;
|
|
public Effect StartBuffLookAtCamera(EffectType type, GameObject fromObject, Camera toCamera) => null;
|
|
public Effect StopBuff(EffectType type, GameObject obj) => null;
|
|
public Effect FadePlay(GameObject obj, float posX, float posY) => null;
|
|
public Effect FadeStop(GameObject obj) => null;
|
|
public Effect FadeStop(EffectType type) => null;
|
|
public Effect Stop(EffectType type) => null;
|
|
public List<string> InitCommonEffect(string filePath, bool isBattle = false, bool isField = false, bool isBattleEffect = false, Action callback = null) => new List<string>();
|
|
public List<string> SetUIParticleShader(List<GameObject> effectObjList, Action callback, bool isBattle = false, bool isField = false) => new List<string>();
|
|
public List<string> SetUIParticleShader(GameObject effectObj, Action callback, bool isBattle = false, bool isField = false) => new List<string>();
|
|
public List<string> LoadUIParticleShader(GameObject effectObj, Action callback, bool isBattle) => new List<string>();
|
|
public void SetOnlyUIParticleShader(GameObject effectObj) { }
|
|
public void SetParticleShader(GameObject effectObj) { }
|
|
public void ChangeMaskShader(GameObject effectObj, int stencil = 1) { }
|
|
public void InitBattleEffect() { }
|
|
public void InitEnemyBattleEffect() { }
|
|
public void DisposeLatestMadeEffects() { }
|
|
public void ClearLastCacheEffect() { }
|
|
public void SetupEffectContainer() { }
|
|
public void DestroyBattleEffectContainer() { }
|
|
public void ImmediateDestroyBattleEffectContainer() { }
|
|
public void ClearBattleFeildEffect() { }
|
|
public void RestUnneededEffect() { }
|
|
public EffectBattle GetEffectBattle(string key) => null;
|
|
public EffectBattle GetEnemyEffectBattle(string key) => null;
|
|
public static MoveType ToStrMoveType(string str) => MoveType.NONE;
|
|
public static EngineType ToStrEngineType(string str) => EngineType.NONE;
|
|
public static TargetType ToStrTargetType(string str) => TargetType.NONE;
|
|
}
|
|
|
|
public class GameObjMgr { }
|
|
|
|
public class GameMgr
|
|
{
|
|
public static GameMgr GetIns() => _ins ??= new GameMgr();
|
|
private static GameMgr _ins;
|
|
|
|
public GameObject m_GameManagerObj;
|
|
public bool IsNewReplayBattle;
|
|
public bool IsAdmin;
|
|
public bool IsWatchHandInvisible;
|
|
public float ScreenAspect = 1.777f;
|
|
public DateTime AnnounceTime;
|
|
public Wizard.RankWinnerReward _rankWinnerReward;
|
|
|
|
public bool IsAdminWatch => false;
|
|
public bool IsWatchBattle => false;
|
|
public bool IsReplayBattle => false;
|
|
public bool IsNetworkBattle => false;
|
|
public bool IsAINetwork => false;
|
|
public bool IsPuzzleQuest => false;
|
|
|
|
private EffectMgr _effect;
|
|
private SoundMgr _sound;
|
|
private DataMgr _data;
|
|
private GameObjMgr _gameObj = new GameObjMgr();
|
|
private PrefabMgr _prefab;
|
|
private InputMgr _input;
|
|
private BattleControl _battleCtrl;
|
|
private NetworkUserInfoData _netUser;
|
|
|
|
public EffectMgr GetEffectMgr() => _effect ??= new EffectMgr();
|
|
public SoundMgr GetSoundMgr() => _sound;
|
|
public DataMgr GetDataMgr() => _data;
|
|
public GameObjMgr GetGameObjMgr() => _gameObj;
|
|
public PrefabMgr GetPrefabMgr() => _prefab;
|
|
public InputMgr GetInputMgr() => _input;
|
|
public BattleControl GetBattleCtrl() => _battleCtrl;
|
|
public NetworkUserInfoData GetNetworkUserInfoData() => _netUser;
|
|
public void SetNetworkUserInfoData(NetworkUserInfoData infoData) => _netUser = infoData;
|
|
public Wizard.MailTopTask GetMailTopTask() => null;
|
|
public Wizard.MyPageTask GetMyPageTask() => null;
|
|
public Wizard.DeckUpdateTask GetDeckUpdateTask() => null;
|
|
public Wizard.CardDestructTask GetCardDestructTask() => null;
|
|
public Wizard.CardCreateTask GetCardCreateTask() => null;
|
|
public Wizard.MissionInfoTask GetMissionInfoTask() => null;
|
|
|
|
public static void CreateIns() { _ins ??= new GameMgr(); }
|
|
public void CreateMgrIns(GameObject gameobj) { }
|
|
public void BuildDeckData() { }
|
|
public void DestroyBattleManagements() { }
|
|
public void Init() { }
|
|
public void InitializeSelfInfo() { }
|
|
public void SettingSelfInfo(Dictionary<string, object> info, bool isWatchReplayRecovery) { }
|
|
public void SettingOpponentInfo(Dictionary<string, object> info, bool isWatchReplayRecovery) { }
|
|
public void SettingBattleStartSelfInfo(Dictionary<string, object> info) { }
|
|
public void SettingBattleStartOpponentInfo(Dictionary<string, object> info) { }
|
|
public void SettingSelfDeck(List<object> info) { }
|
|
public bool IsUseUnapprovedList(bool isPlayer) => false;
|
|
}
|
|
|
|
public class UIManager
|
|
{
|
|
public static UIManager GetInstance() => _ins ??= new UIManager();
|
|
public static UIManager GetIns() => GetInstance();
|
|
private static UIManager _ins;
|
|
|
|
public enum ViewScene
|
|
{
|
|
None, Battle, Bingo, BuildDeckPurchasePage, CardAllList, CardSleevePurchasePage,
|
|
ClassSkinPurchasePage, Colosseum, CrossoverPortal, DeckList, Gacha, Gathering,
|
|
LeaderPopularityVote, LoginBonus, LotteryPage, Mission, MyPage,
|
|
NeutralPopularityVote, Profile, QuestSelectionPage, RankMatch, Room,
|
|
StorySelectPage, StorySelectionWorld, TwoPick,
|
|
}
|
|
public class ChangeViewSceneParam { public ChangeViewSceneParam() { } }
|
|
|
|
public Camera UIRootLoadingCamera;
|
|
public Dictionary<ViewScene, ChangeViewSceneParam> TopBarBackParameterDict = new Dictionary<ViewScene, ChangeViewSceneParam>();
|
|
public Footer _Footer => null;
|
|
public bool IsTouchable => true;
|
|
|
|
public Camera getCamera() => null;
|
|
public GameObject gameObject => null;
|
|
public Coroutine StartCoroutine(IEnumerator routine) => null;
|
|
public UIBase GetUIBase(ViewScene scene) => null;
|
|
public T GetCurrentSceneParam<T>() where T : class => null;
|
|
public void ChangeViewScene(ViewScene nextScene, ChangeViewSceneParam param = null, object sceneParam = null) { }
|
|
public void Force_Increment_LockCountChangeView() { }
|
|
public void Force_Decrement_LockCountChangeView() { }
|
|
public ViewScene GetCurrentScene() => ViewScene.Battle;
|
|
public bool IsCurrentScene(ViewScene scene) => false;
|
|
public UIBase GetUiBaseOfCurrentScene() => null;
|
|
public DialogBase CreateDialogClose(bool isSystem = false, bool dontChangeLabelColor = false) => null;
|
|
public DialogBase CreateConfirmationDialog(string message) => null;
|
|
public void dialogAllClear() { }
|
|
public bool isOpenDialog() => false;
|
|
public bool isOpenLoading() => false;
|
|
public void closeInSceneLoading(bool force = true) { }
|
|
public void createInSceneCenterLoading(bool notBlack = false, bool notCollider = false, bool force = true, string overrideText = null) { }
|
|
public void closeInSceneCenterLoading(bool force = true, bool disableCollider = false) { }
|
|
public LoadingInScene CloseInSceneLoadingMatching() => null;
|
|
public LoadingInScene createInSceneLoadingBattle(bool notBlack = false, bool notCollider = false) => null;
|
|
public LoadingInScene CloseInSceneLoadingBattle() => null;
|
|
public bool isFading() => false;
|
|
public bool IsActiveFirstTips() => false;
|
|
public VideoHostingHUD GetVideoHostingHUD() => null;
|
|
public void setBackScene(GameObject obj, ViewScene backScene) { }
|
|
public static void ApplicationQuit() { }
|
|
public static void SetObjectToGrey(GameObject o, bool b) { }
|
|
public static void ShowDialogUrl(string title, string url, Action<DialogBase> onDialogOpening = null) { }
|
|
|
|
public class CreatFade { }
|
|
public void CreatFadeOpen() { }
|
|
public void CreatFadeBlack() { }
|
|
public Wizard.RankWinnerReward createRankWinnerReward() => null;
|
|
}
|
|
|
|
public class Footer { }
|
|
public class VideoHostingHUD { }
|
|
|
|
namespace Wizard
|
|
{
|
|
// RankWinnerReward, CardDestructTask, CardCreateTask, MissionInfoTask already exist
|
|
// in the copied set (declared in other files) -- only these three were missing.
|
|
public class MailTopTask { }
|
|
public class MyPageTask { }
|
|
public class DeckUpdateTask { }
|
|
}
|