コード例 #1
0
 public static void Postfix(LocoKeyboardInputShunter __instance)
 {
     if (__instance.currentInputSpeedThrottle == 0.0f && __instance.throttleVelo == 0.0f)
     {
         __instance.setThrottleDelegate(ThrottleNotching.Notched(__instance.control.targetThrottle));
     }
 }
コード例 #2
0
            public static bool Prefix(LocoControllerShunter __instance)
            {
                var sim = __instance.sim;

                sim.throttle.SetValue(sim.engineOn ? ThrottleNotching.Notched(__instance.targetThrottle) : 0.0f);
                return(false);
            }
コード例 #3
0
ファイル: DieselPower.cs プロジェクト: mspielberg/dv-zrealism
 // Notches 0 and 1 are idle, so 7 distinct RPM settings possible
 public static float TargetRPM(float targetThrottle) =>
 Mathf.Max(0f, (ThrottleNotching.GetNotch(targetThrottle) - 1) / (NumNotches - 1));