private void Update() { float mappedPressureValue = _axisValueProvider.GetOutput(); if (mappedPressureValue > 0) { mappedPressureValue = _mappedCurve.Evaluate(_axisValueProvider.GetOutput()); } _circleShaderMaterialMeshRenderer.sharedMaterial.SetFloat("_BackgroundCutoff", 1 - mappedPressureValue); }
void LateUpdate() { // Properly erase all even with the 24 limits from the shader. if (_clearAllTrigger.IsValid()) { _drawingAction.EraseAll(); } _drawingAction.Update(_drawingTrigger.GetOutput() > 0); }
private void Update() { if (_drawingTrigger.GetOutput() > 0 && _buttonState == EButtonEvent.OnButtonUp) { _buttonState = EButtonEvent.OnButtonDown; } else if (_drawingTrigger.GetOutput() > 0) { _buttonState = EButtonEvent.OnButton; } if (CanDraw == false && _buttonState == EButtonEvent.OnButtonDown && !_preventAirDrawingOnRaycast.IsValid()) { CanDraw = true; } if (_drawingTrigger.GetOutput() <= 0) { CanDraw = false; _buttonState = EButtonEvent.OnButtonUp; } _airDrawingAction.Update(CanDraw && !_preventAirDrawingOnCollision.IsValid()); }
private void ApplyScalarSize() { var scalarValue = _lineWidthProvider.GetOutput(); _brushSize = _drawingModifier.CalculateScalarSize(_brushSize, scalarValue); }