public static void Postfix(ComboUIController __instance) { RectTransform textTransform = __instance.transform.Find("ComboText") as RectTransform; if (!textTransform) { return; } GameObject textObject = textTransform.gameObject; bool wasActive = textObject.activeSelf; textObject.SetActive(false); TextMeshProUGUI text = textObject.GetComponent <CurvedTextMeshPro>(); text.fontStyle |= FontStyles.UpperCase; text.alignment = TextAlignmentOptions.Baseline; var offset = new Vector2(0, 6); textTransform.offsetMin -= offset; textTransform.offsetMax -= offset; textTransform.sizeDelta = new Vector2(180, textTransform.sizeDelta.y); LocalizedTextMeshProUGUI localizedText = textObject.AddComponent <LocalizedTextMeshProUGUI>(); localizedText.SetField <LocalizedTextComponent <TextMeshProUGUI>, TextMeshProUGUI>("localizedComponent", text); localizedText.Key = "LABEL_COMBO"; textObject.SetActive(wasActive); }
[Inject] public void ModifierInit(ComboUIController cuic, Config.Combo c) { Logger.Logger.Debug("ComboModifier:ModifierInit()"); ComboController = cuic; Config = c; transform.SetParent(cuic.transform); ModPanel(); }
public void GetControllers() { DismissGraph(null); levelOk = false; averageHitValue = 0.0f; averageHitValueSize = 0; secondaryAverageHitValue = 0.0f; secondaryAverageHitValueSize = 0; energyList.Clear(); secondaryEnergyList.Clear(); misses.Clear(); if (PluginConfig.Instance.mode == PluginConfig.MeasurementMode.Energy) { energyList.Add(new Pair <float, float>(0.0f, 0.5f)); } if (PluginConfig.Instance.secondaryMode == PluginConfig.MeasurementMode.Energy) { secondaryEnergyList.Add(new Pair <float, float>(0.0f, 0.5f)); } scoreController = Resources.FindObjectsOfTypeAll <ScoreController>().LastOrDefault(); ComboUIController comboUIController = Resources.FindObjectsOfTypeAll <ComboUIController>().LastOrDefault(); energyCounter = Resources.FindObjectsOfTypeAll <GameEnergyCounter>().LastOrDefault(); rankCounter = Resources.FindObjectsOfTypeAll <RelativeScoreAndImmediateRankCounter>().LastOrDefault(); audioController = Resources.FindObjectsOfTypeAll <AudioTimeSyncController>().LastOrDefault(); endActions = Resources.FindObjectsOfTypeAll <StandardLevelGameplayManager>().LastOrDefault(); if (endActions == null) { endActions = Resources.FindObjectsOfTypeAll <MissionLevelGameplayManager>().LastOrDefault(); } if (endActions != null && scoreController != null && energyCounter != null && rankCounter != null && audioController != null && comboUIController != null) { objectManager = (BeatmapObjectManager)_beatmapObjectManager.GetValue(scoreController); comboController = (ComboController)_comboController.GetValue(comboUIController); objectManager.noteWasCutEvent += NoteHit; objectManager.noteWasMissedEvent += NoteMiss; comboController.comboBreakingEventHappenedEvent += ComboBreak; endActions.levelFinishedEvent += LevelFinished; endActions.levelFailedEvent += LevelFinished; Logger.log.Debug("PerformanceMeter reloaded successfully"); } else { Logger.log.Error("Could not reload PerformanceMeter. This may occur when playing online - if so, disregard this message."); scoreController = null; objectManager = null; comboController = null; energyCounter = null; rankCounter = null; audioController = null; endActions = null; } }
[Inject] internal void ModifierInit(ComboUIController cuic, ImmediateRankUIPanel iruip, Config.Miscellaneous c) { Logger.Logger.Debug("LegacyPanelModifier:ModifierInit()"); ComboController = cuic; RankPanel = iruip; Config = c; transform.SetParent(iruip.transform); ModPanel(); }
static bool Prefix(ComboUIController __instance) { if (NoMissTextConfig.Instance.HideDumbFCBreakLines) { if (!__instance.GetField <bool, ComboUIController>("_comboLost")) { __instance.SetField("_comboLost", true); __instance.transform.Find("Line0").gameObject.SetActive(false); __instance.transform.Find("Line1").gameObject.SetActive(false); } return(false); } return(true); }
/// <summary> /// Prefix /// </summary> /// <param name="__instance">ComboUIController instance</param> internal static bool Prefix(ref ComboUIController __instance, ref bool ____comboLost) { if (!Config.GameTweaker.Enabled || !Config.GameTweaker.RemoveFullComboLossAnimation) { return(true); ///< Continue to original function } if (!____comboLost) { ____comboLost = true; __instance.transform.Find("Line0")?.gameObject.SetActive(false); __instance.transform.Find("Line1")?.gameObject.SetActive(false); return(false); ///< Skip original function } return(true); ///< Continue to original function }
protected override void OnDestroy() { ComboController = null !; RankPanel = null !; Config = null !; }
protected override void OnDestroy() { ComboController = null !; Config = null !; FCLines = null !; }