diff --git a/RunningLateGame/Assets/Scripts/CarController.cs b/RunningLateGame/Assets/Scripts/CarController.cs
index 665b54d..d034bcb 100644
--- a/RunningLateGame/Assets/Scripts/CarController.cs
+++ b/RunningLateGame/Assets/Scripts/CarController.cs
@@ -51,12 +51,12 @@ public enum Axel
///
/// inputs for acceleration
///
- private float _currentAcceleration;
+ [SerializeField] private float _currentAcceleration;
///
/// inputs for turning
///
- private float _currentTurn;
+ [SerializeField] private float _currentTurn;
///
/// to move the car
@@ -82,7 +82,8 @@ public void SetInputs(float forwardAmount, float turnAmount)
///
public void Move()
{
- foreach (var wheel in wheels) wheel.wheelCollider.motorTorque = _currentAcceleration;
+ foreach (var wheel in wheels)
+ wheel.wheelCollider.motorTorque = _currentAcceleration;
}
///
@@ -103,8 +104,12 @@ public void Brake()
///
public void Steering()
{
- foreach (var wheel in wheels.Where(wheel => wheel.axel == Axel.Front))
- wheel.wheelCollider.steerAngle = _currentTurn;
+ foreach (var wheel in wheels)
+ if (wheel.axel == Axel.Front)
+ {
+ wheel.wheelCollider.steerAngle = _currentTurn;
+
+ }
}
///