Example #1
0
    private void FixedUpdate()
    {
        UpdateWheelsVisual();

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