private void FixedUpdate() { UpdateWheelsVisual(); if (CurrentTiltBlocker) { CurrentTiltBlocker.ControlTilt(); } }
private void Awake() { rigidbody.centerOfMass = centerOfMass.transform.localPosition; tiltBlockers = new Queue <TiltBlocker>(GetComponents <TiltBlocker>()); if (CurrentTiltBlocker) { CurrentTiltBlocker.OnTiltBlockerEnable(false); } VehicleEffects = GetComponent <VehicleEffects>(); }
public void HandleChangeTiltBlockerInput() { if (CurrentTiltBlocker) { CurrentTiltBlocker.OnTiltBlockerDisable(); } tiltBlockers.Enqueue(tiltBlockers.Dequeue()); if (CurrentTiltBlocker) { CurrentTiltBlocker.OnTiltBlockerEnable(); } }