This commit is contained in:
2025-05-13 03:19:28 +03:00
parent e2847b060d
commit 762dcf4524
784 changed files with 542617 additions and 2 deletions
@@ -0,0 +1,24 @@
using UnityEngine;
using System.Collections;
public class CarEngineDebug : MonoBehaviour{
public CarEngine engine;
void OnGUI()
{
if (engine != null)
{
GUI.Label(new Rect(0, 10, 200, 30), "Engine RPM: " + engine.Rpm);
}
if (GUI.Button(new Rect(0, 70, 100, 30), "Reset engine"))
{
engine.engineThrolle = 0.0548135214770327;
engine.inputThrolle = 0;
engine.angularSpeed = MathEx.RpmToRadS * 500;
engine.angularSpeedRPM = MathEx.RadSToRpm * engine.angularSpeed;
engine.crankshaftAngle = 0.0;
engine.idleThrolleController.IdleThrolle = 0.0548135214770327;
}
}
}