private void Debug(int id) { switch (id) { case 0: Screen.ShowSubtitle($"WSpeed: {Math.Round(WheelSpeed)} " + $"RPM: {Math.Round(EngineRpm, 2)} " + $"Breaking: {IsBreaking} " + $"Idle: {IsIdle} " + $"Neutral: {IsNeutral} " + $"Accel: {IsAccelerating} " + $"Revers: {IsReversing} " + $"Revving: {IsRevving}"); break; case 1: Screen.ShowSubtitle($"Accel: {_engineAccell1Sound.IsAnyInstancePlaying} {_engineAccell1Sound.InstancesNumber} " + $"Decel: {_engineDecellSound.IsAnyInstancePlaying} {_engineDecellSound.InstancesNumber} " + $"Neutral: {_engineNeutralSound.IsAnyInstancePlaying} {_engineNeutralSound.InstancesNumber} " + $"Reverse: {_engineReverseSound.IsAnyInstancePlaying} {_engineReverseSound.InstancesNumber} " + $"Idle: {_engineIdleSound.IsAnyInstancePlaying} {_engineIdleSound.InstancesNumber} " + $"Rev: {_engineRevvingSound.IsAnyInstancePlaying} {_engineRevvingSound.InstancesNumber} "); break; case 2: Screen.ShowSubtitle($"WSpeed: {Math.Round(WheelSpeed, 2)} Accel: {Math.Round(Acceleration, 2)} IsAccel: {IsAccelerating} " + $"RPM: {Math.Round(EngineRpm, 2)} "); break; } }
public void ShowSubtitle(string entry, int duration = 2500, params object[] values) { Screen.ShowSubtitle(string.Format(GetLocalizedText(entry), values), duration); }
public void ShowSubtitle(string entry, params object[] values) { Screen.ShowSubtitle(string.Format(GetLocalizedText(entry), values)); }
/// <summary> /// Shows a localized subtitle at the bottom of the screen for a given time /// </summary> /// <param name="entry">Name of the entry.</param> /// <param name="duration">The duration to display the subtitle in milliseconds.</param> public void ShowSubtitle(string entry, int duration = 2500) { Screen.ShowSubtitle(GetLocalizedText(entry), duration); }