private static void OnPause(On.HeroController.orig_Pause orig, HeroController hc) { if (CustomKnight.GlobalSettings.showMovedText) { Panel.SetActive(true, false); } orig(hc); }
private static void OnPause(On.HeroController.orig_Pause orig, HeroController hc) { Panel.SetActive(true, false); WPanel.SetActive(SessionManager.Instance.WHostEnabled, !SessionManager.Instance.WHostEnabled); PPanel.SetActive(true, false); enabled = true; orig(hc); }
/** * If we don't reset the input of the hero when pausing, we might continue sliding across the floor * due to the timescale not being set to 0 */ private void HeroControllerOnPause(On.HeroController.orig_Pause orig, HeroController self) { if (!_netClient.IsConnected) { orig(self); return; } // We simply call the private ResetInput method to prevent the knight from continuing movement // while the game is paused typeof(HeroController).InvokeMember( "ResetInput", BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.InvokeMethod, null, HeroController.instance, null ); }
private static void OnPause(On.HeroController.orig_Pause orig, HeroController hc) { Panel.SetActive(true, false); orig(hc); }