public static void InitializeCheats() { CheatToolsWindow.OnShown = window => { _studioInstance = Studio.Studio.IsInstance() ? Studio.Studio.Instance : null; _soundInstance = Manager.Sound.instance; _sceneInstance = Scene.instance; _gameMgr = Game.IsInstance() ? Game.Instance : null; _baseMap = BaseMap.instance; _hScene = HSceneFlagCtrl.IsInstance() ? HSceneFlagCtrl.Instance : null; _openInInspectorButtons = new[] { new KeyValuePair <object, string>(_gameMgr != null && _gameMgr.heroineList.Count > 0 ? (Func <object>)(() => _gameMgr.heroineList.Select(x => new ReadonlyCacheEntry(GetHeroineName(x), x))) : null, "Heroine list"), new KeyValuePair <object, string>(ADVManager.IsInstance() ? ADVManager.Instance : null, "Manager.ADVManager.Instance"), new KeyValuePair <object, string>(_baseMap, "Manager.BaseMap.instance"), new KeyValuePair <object, string>(Character.IsInstance() ? Character.Instance : null, "Manager.Character.Instance"), new KeyValuePair <object, string>(typeof(Manager.Config), "Manager.Config"), new KeyValuePair <object, string>(_gameMgr, "Manager.Game.Instance"), new KeyValuePair <object, string>(GameSystem.IsInstance() ? GameSystem.Instance : null, "Manager.GameSystem.Instance"), new KeyValuePair <object, string>(_sceneInstance, "Manager.Scene.instance"), new KeyValuePair <object, string>(_soundInstance, "Manager.Sound.instance"), new KeyValuePair <object, string>(_studioInstance, "Studio.Instance"), new KeyValuePair <object, string>((Func <object>)EditorUtilities.GetRootGoScanner, "Root Objects") }; }; CheatToolsWindow.Cheats.Add(new CheatEntry(w => _hScene != null, DrawHSceneCheats, null)); CheatToolsWindow.Cheats.Add(new CheatEntry(w => _baseMap != null && (_hScene != null || Singleton <LobbySceneManager> .IsInstance()), DrawGirlCheatMenu, "Unable to edit character stats on this screen. Start an H scene or enter the lobby.")); CheatToolsWindow.Cheats.Add(CheatEntry.CreateOpenInInspectorButtons(() => _openInInspectorButtons)); CheatToolsWindow.Cheats.Add(new CheatEntry(w => _studioInstance == null && _gameMgr != null && _gameMgr.saveData != null, DrawGlobalUnlocks, null)); HarmonyLib.Harmony.CreateAndPatchAll(typeof(Hooks)); }
void Awake() { advManager = GameObject.Find("Manager").GetComponent<ADVManager>(); }
void Awake() { advManager = GameObject.Find("Manager").GetComponent<ADVManager>(); charaName.text = texts[index].charaName; texts[index].start(canvas, charaImagePosY); }