static void Postfix(scrController __instance) { if (__instance.mistakesManager != null) { Main.statsMenu.currPerc = __instance.controller.percentComplete * 100f; } }
public static void Postfix(scrController __instance) { __instance.redPlanet.SetRainbow(false); __instance.redPlanet.LoadPlanetColor(); __instance.bluePlanet.SetRainbow(false); __instance.bluePlanet.LoadPlanetColor(); }
public static void Postfix(ref bool __result, scrController __instance) { // Stop player inputs while we're editing the keys if (Settings.IsListening) { return; } // Don't force keys if it's paused if (scrController.instance?.paused ?? true) { return; } // Do not override special keys in CLS if (__instance.CLSMode) { return; } // Force active keys to not be special foreach (KeyCode code in Settings.ActiveKeys) { if (Input.GetKeyDown(code)) { __result = false; return; } } }
private void Awake() { startingPos = transform.position; controller = GameObject.FindWithTag("GameController").GetComponent <scrController>(); gameObject.tag = "draggable"; transform.Translate(new Vector3(0, 0, -2.5f)); // tıklama bugı fix GetComponent <SpriteRenderer>().sortingOrder = 1; // staticlerden üste çıkarma }
private static void Prefix(scrController __instance, int portalDestination, string portalArguments) { if (!Main.Settings.ClearFlash) { return; } Main.disableFlashOnce = true; }
private static void Prefix(scrController __instance) { var scrController = __instance; if (scrController.txtCaption != null && Main.settings.MiscSettings.HideSpeedTrial1Text && GCS.speedTrialMode && GCS.currentSpeedRun.ToString("0.0") == "1.0") { scrController.txtCaption.text = __instance.caption; } }
public static void Prefix(scrController __instance) { L.og(GCS._checkpointNum); //L.og(_currentSeqID); if (RandomTweaks.settings.DisableRestartAtCheckpoint) { GCS._checkpointNum = 0; } }
public static void Postfix(scrController __instance) { if (!Settings.DisableFilter) { return; } foreach (MonoBehaviour behavior in __instance.filterToComp.Values) { behavior.enabled = false; } }
static bool Prefix(scrController __instance) { Main.statsMenu.hitDict = new Dictionary <HitMargin, int>() { { HitMargin.EarlyPerfect, 0 }, { HitMargin.TooEarly, 0 }, { HitMargin.VeryEarly, 0 }, { HitMargin.Perfect, 0 }, { HitMargin.TooLate, 0 }, { HitMargin.VeryLate, 0 }, { HitMargin.LatePerfect, 0 }, }; return(true); }
public static bool Prefix(ref int __result, scrController __instance) { // Do not limit keys if current scene is CLS and player has // disabled key limiting in CLS if (!Settings.LimitKeyOnCLS && __instance.CLSMode) { return(true); } // Do not limit keys if player is in main screen and has // disabled key limiting in there if (!Settings.LimitKeyOnMainScreen && !__instance.gameworld && !__instance.CLSMode) { return(true); } // Stop player inputs while we're editing the keys if (Settings.IsListening) { __result = 0; return(false); } int keysPressed = 0; // Check registered keys foreach (KeyCode code in Settings.ActiveKeys) { if (Input.GetKeyDown(code)) { keysPressed++; } } // Always account for certain keys foreach (KeyCode code in KeyLimiterTweak.ALWAYS_BOUND_KEYS) { if (Input.GetKeyDown(code)) { keysPressed++; } } // Limit keys pressed __result = Mathf.Min(__instance.pseudoMultipress ? 3 : 1, keysPressed); return(false); }
internal static bool Prefix(scrController __instance, ref bool __result) { if (__instance.CLSMode) { if (Main.settings.KeyBindSettings.ClsKeyBindSettings.MapInfo && Input.GetKeyDown(KeyCode.I)) { __result = true; return(false); } if (Main.settings.KeyBindSettings.ClsKeyBindSettings.EnterMap && Input.GetKeyDown(KeyCode.LeftArrow)) { __result = true; return(false); } if (Main.settings.KeyBindSettings.ClsKeyBindSettings.Workshop && Input.GetKeyDown(KeyCode.W)) { __result = true; return(false); } if (Main.settings.KeyBindSettings.ClsKeyBindSettings.Reload && Input.GetKeyDown(KeyCode.R)) { __result = true; return(false); } if (Main.settings.KeyBindSettings.ClsKeyBindSettings.Editor && Input.GetKeyDown(KeyCode.E)) { __result = true; return(false); } if (Main.settings.KeyBindSettings.ClsKeyBindSettings.MapInfo && Input.GetKeyDown(KeyCode.I)) { __result = true; return(false); } } return(true); }
private static void Prefix(scrController __instance) { if (!scrController.instance.paused && scrConductor.instance.isGameWorld) { var CurrentTile = (scrController.instance.currentSeqID); var TotalTile = (scrController.instance.lm.listFloors.Count - 1); var LeftTile = TotalTile - CurrentTile; Text.Content = Main.Settings.TextTemplate .Replace("<CurrentTile>", CurrentTile.ToString()) .Replace("<LeftTile>", LeftTile.ToString()) .Replace("<TotalTile>", TotalTile.ToString()); } else { Text.Content = Main.Settings.NotPlayingText; } }
private static void Prefix(scrController __instance) { if (!scrController.instance.paused && scrConductor.instance.isGameWorld) { if (!scrConductor.instance.song.clip) { return; } TimeSpan nowt = TimeSpan.FromSeconds(scrConductor.instance.song.time); TimeSpan tott = TimeSpan.FromSeconds(scrConductor.instance.song.clip.length); Text.Content = Main.Settings.TextTemplate .Replace("<NowMinute>", nowt.Minutes.ToString()) .Replace("<NowSecond>", nowt.Seconds.ToString("00")) .Replace("<TotalMinute>", tott.Minutes.ToString()) .Replace("<TotalSecond>", tott.Seconds.ToString("00")); } else { Text.Content = Main.Settings.NotPlaying; } }
internal static bool Prefix(scrController __instance, ref bool __result) { bool check(bool enabled, bool down) { return(enabled && down); } var settings = MiscModule.Settings; if (__instance.CLSMode) { if (check(settings.KeyBinding.CLS.reloadKeyActive, settings.KeyBinding.CLS.reloadKey.Down()) || check(settings.KeyBinding.CLS.workshopKeyActive, settings.KeyBinding.CLS.workshopKey.Down()) || check(settings.KeyBinding.CLS.instantJoinKeyActive, settings.KeyBinding.CLS.instantJoinKey.Down()) || check(settings.KeyBinding.CLS.editorKeyActive, settings.KeyBinding.CLS.editorKey.Down())) { __result = true; return(false); } } return(true); }
private static void Prefix(scrController __instance) { Text.Content = Main.Settings.NotPlaying; }
private void Awake() { controller = GameObject.FindWithTag("GameController"); controllerComponent = controller.GetComponent <scrController>(); }