1
This commit is contained in:
@@ -58,13 +58,14 @@ namespace BITKit.Vehicles
|
||||
private readonly ValidHandle highSpeedHandle = new();
|
||||
private IUnityEntity _unityEntity;
|
||||
|
||||
[Inject]
|
||||
[Inject(true)]
|
||||
private IHealth _health;
|
||||
|
||||
public override void OnAwake()
|
||||
{
|
||||
base.OnAwake();
|
||||
_health.OnSetAlive += OnSetAlive;
|
||||
if (_health is not null)
|
||||
_health.OnSetAlive += OnSetAlive;
|
||||
}
|
||||
|
||||
private void OnSetAlive(bool obj)
|
||||
@@ -122,7 +123,7 @@ namespace BITKit.Vehicles
|
||||
{
|
||||
trans.localEulerAngles = new Vector3(torque * Time.deltaTime, steelAngle, 0);
|
||||
});
|
||||
if (steeringWheel is not null)
|
||||
if (steeringWheel)
|
||||
steeringWheel.localEulerAngles = new Vector3(0, 0, steelAngle);
|
||||
x.wheels.ForEach(wheelCollider => { wheelCollider.steerAngle = steel; });
|
||||
break;
|
||||
|
Reference in New Issue
Block a user