public override void HandleEvent(BrakeControllerEvent evt, float?value) { switch (evt) { case BrakeControllerEvent.StartIncrease: NotchController.StartIncrease(value); break; case BrakeControllerEvent.StartDecrease: NotchController.StartDecrease(value); break; case BrakeControllerEvent.SetCurrentPercent: if (value != null) { float newValue = value.Value; NotchController.SetPercent(newValue); } break; case BrakeControllerEvent.SetCurrentValue: if (value != null) { float newValue = value.Value; NotchController.SetValue(newValue); } break; case BrakeControllerEvent.StartDecreaseToZero: NotchController.StartDecrease(value, true); break; } }
public override void InitializeMoving() { NotchController.SetValue(0); NotchController.CurrentNotch = 0; }