コード例 #1
0
        private void Update()
        {
            float mappedPressureValue = _axisValueProvider.GetOutput();

            if (mappedPressureValue > 0)
            {
                mappedPressureValue = _mappedCurve.Evaluate(_axisValueProvider.GetOutput());
            }
            _circleShaderMaterialMeshRenderer.sharedMaterial.SetFloat("_BackgroundCutoff", 1 - mappedPressureValue);
        }
コード例 #2
0
 void LateUpdate()
 {
     // Properly erase all even with the 24 limits from the shader.
     if (_clearAllTrigger.IsValid())
     {
         _drawingAction.EraseAll();
     }
     _drawingAction.Update(_drawingTrigger.GetOutput() > 0);
 }
コード例 #3
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());
        }
コード例 #4
0
        private void ApplyScalarSize()
        {
            var scalarValue = _lineWidthProvider.GetOutput();

            _brushSize = _drawingModifier.CalculateScalarSize(_brushSize, scalarValue);
        }