public static void HScene_SetStartVoice_HeightPostfix() { if (AI_UnlockPlayerHeight.actor != null) { AI_UnlockPlayerHeight.ApplySettings(AI_UnlockPlayerHeight.actor); } }
private void Awake() { instance = this; Logger = base.Logger; alignCamera = Config.Bind(new ConfigDefinition("Camera", "Align camera to player height"), true, new ConfigDescription("Aligns camera position according to player height")); lookAtOffset = Config.Bind(new ConfigDefinition("Camera", "Camera y offset"), 0f, new ConfigDescription("Camera lookAt y offset", new AcceptableValueRange <float>(-10f, 10f))); lookAtPOVOffset = Config.Bind(new ConfigDefinition("Camera", "Camera POV y offset"), 0f, new ConfigDescription("Camera lookAtPOV y offset", new AcceptableValueRange <float>(-10f, 10f))); cardHeight = Config.Bind(new ConfigDefinition("Free Roam & Events", "Height from card"), true, new ConfigDescription("Set players height according to the value in the card")); customHeight = Config.Bind(new ConfigDefinition("Free Roam & Events", "Custom height"), 75, new ConfigDescription("If 'Height from card' is off, use this value instead", new AcceptableValueRange <int>(-100, 200))); cardHeightDuringH = Config.Bind(new ConfigDefinition("H Scene", "Height from card (H)"), false, new ConfigDescription("Set players height according to the value in the card")); customHeightDuringH = Config.Bind(new ConfigDefinition("H Scene", "Custom height (H)"), 75, new ConfigDescription("If 'Height from card' is off, use this value instead", new AcceptableValueRange <int>(-100, 200))); var harmony = new HarmonyLib.Harmony("HS2_UnlockPlayerHeight"); harmony.PatchAll(typeof(CoreHooks)); if (Application.productName != "AI-Syoujyo" && Application.productName != "AI-Shoujo") { return; } alignCamera.SettingChanged += delegate { ApplySettings(actor); }; lookAtOffset.SettingChanged += delegate { ApplySettings(actor); }; cardHeight.SettingChanged += delegate { ApplySettings(actor); }; customHeight.SettingChanged += delegate { ApplySettings(actor); }; cardHeightDuringH.SettingChanged += delegate { ApplySettings(actor); }; customHeightDuringH.SettingChanged += delegate { ApplySettings(actor); }; harmony.PatchAll(typeof(GameHooks)); }
public static void HScene_OnDisable_HeightPostfix(HScene __instance) { AI_UnlockPlayerHeight.inH = false; if (__instance != null && AI_UnlockPlayerHeight.actor != null) { AI_UnlockPlayerHeight.ApplySettings(AI_UnlockPlayerHeight.actor); } }
public static void HScene_InitCoroutine_HeightPostfix(HScene __instance) { AI_UnlockPlayerHeight.inH = true; if (__instance != null && AI_UnlockPlayerHeight.actor != null) { AI_UnlockPlayerHeight.ApplySettings(AI_UnlockPlayerHeight.actor); } }
private void Awake() { instance = this; Logger = base.Logger; alignCamera = Config.Bind(new ConfigDefinition("Camera", "Align camera to player height"), true, new ConfigDescription("Aligns camera position according to player height")); lookAtOffset = Config.Bind(new ConfigDefinition("Camera", "Camera y offset"), 0f, new ConfigDescription("Camera lookAt y offset", new AcceptableValueRange <float>(-10f, 10f))); lookAtPOVOffset = Config.Bind(new ConfigDefinition("Camera", "Camera POV y offset"), 0f, new ConfigDescription("Camera lookAtPOV y offset", new AcceptableValueRange <float>(-10f, 10f))); cardHeight = Config.Bind(new ConfigDefinition("Free Roam & Events", "Height from card"), true, new ConfigDescription("Set players height according to the value in the card", null, new ConfigurationManagerAttributes { Order = 1 })); customHeight = Config.Bind(new ConfigDefinition("Free Roam & Events", "Custom height"), 75, new ConfigDescription("If 'Height from card' is off, use this value instead'", new AcceptableValueRange <int>(-100, 200), null, new ConfigurationManagerAttributes { Order = 2 })); cardHeightDuringH = Config.Bind(new ConfigDefinition("H Scene", "Height from card (H)"), false, new ConfigDescription("Set players height according to the value in the card", null, new ConfigurationManagerAttributes { Order = 1 })); customHeightDuringH = Config.Bind(new ConfigDefinition("H Scene", "Custom height (H)"), 75, new ConfigDescription("If 'Height from card' is off, use this value instead'", new AcceptableValueRange <int>(-100, 200), null, new ConfigurationManagerAttributes { Order = 2 })); HarmonyWrapper.PatchAll(typeof(CoreHooks)); if (Application.productName == "AI-Syoujyo") { alignCamera.SettingChanged += delegate { ApplySettings(actor); }; lookAtOffset.SettingChanged += delegate { ApplySettings(actor); }; cardHeight.SettingChanged += delegate { ApplySettings(actor); }; customHeight.SettingChanged += delegate { ApplySettings(actor); }; cardHeightDuringH.SettingChanged += delegate { ApplySettings(actor); }; customHeightDuringH.SettingChanged += delegate { ApplySettings(actor); }; HarmonyWrapper.PatchAll(typeof(GameHooks)); } inH = false; }
public static void HScene_OnDisable_HeightPostfix() => AI_UnlockPlayerHeight.ApplySettings(AI_UnlockPlayerHeight.actor);
public static void PlayerActor_InitializeIK_HeightPostfix(PlayerActor __instance) => AI_UnlockPlayerHeight.ApplySettings(__instance);