private static void Postfix(UltimateAdmiral.UI.BattleRightBottomPanel __instance, GameObject selection) { for (int i = __instance.speedButtons.Length - 1; i > 0; i--) { BattleRightBottomPanel.ButtonRec buttonRec = __instance.speedButtons[i]; if (buttonRec.selection == selection) { BattleLogic.instance.pauseSound = true; BattleLogic.instance.GameSpeed = buttonRec.speed * 5f * _settings.SpeedMultiplier; return; } } }
private static void Postfix(BattleRightBottomPanel __instance, GameObject selection) { for (int i = __instance.speedButtons.Length - 1; i > 0; i--) { BattleRightBottomPanel.ButtonRec buttonRec = __instance.speedButtons[i]; bool flag = buttonRec.selection == selection; if (flag) { BattleLogic.instance.pauseSound = true; BattleLogic.instance.GameSpeed = buttonRec.speed * 5f * (float)Main._settings.SpeedMultiplier; break; } } }