Fixed ui
This commit is contained in:
@@ -110,12 +110,11 @@ namespace Car_simulation.Core.Components
|
||||
|
||||
public string GetCurrentGearName()
|
||||
{
|
||||
return _currentGear switch
|
||||
{
|
||||
-1 => "R",
|
||||
0 => "N",
|
||||
_ => _currentGear.ToString()
|
||||
};
|
||||
if (_currentGear == -1) return "R";
|
||||
if (_currentGear == 0) return "N";
|
||||
if (_currentGear > 0 && _currentGear <= GearRatios.Length) return _currentGear.ToString();
|
||||
|
||||
return "??"; // Debugging: if you see this, _currentGear is out of bounds
|
||||
}
|
||||
|
||||
public float GetClutchSlipPercent() => ClutchSlipRatio * 100f;
|
||||
|
||||
Reference in New Issue
Block a user