Пример #1
0
 static void Postfix(SpeedControlUI __instance)
 {
     try
     {
         GameSpeedState uiShowsGameSpeed = (GameSpeedState)AccessTools.Field(typeof(SpeedControlUI), "uiShowsGameSpeed").GetValue(__instance);
         if (uiShowsGameSpeed.GetEffectiveGameSpeed() == GameSpeed.Fast)
         {
             // GameSpeed is already fast, so that means we need to make it faster!
             fastmodemultiplier.speedMultiplier.Value += 1f;
             // NoonUtility.Log("GetEffectiveGameSpeed() == GameSpeed.Fast, multiplier value set to: " + fastmodemultiplier.speedMultiplier.Value);
         }
         else if (uiShowsGameSpeed.GetEffectiveGameSpeed() == GameSpeed.Normal)
         {
             // decrease speed multiplier to baseline
             fastmodemultiplier.speedMultiplier.Value = 1f;
             // NoonUtility.Log("Set Normal Speed Multiplier");
         }
     }
     catch (Exception e)
     {
         NoonUtility.LogException(e);
     }
 }
Пример #2
0
 static void Postfix(SpeedControlUI __instance, int idx)
 {
     __instance.pauseButton.transform.parent.GetComponent <UnityEngine.UI.ToggleGroup>().allowSwitchOff = false;
 }