コード例 #1
0
        /// <summary>
        /// Retrieves the currently selected properties from the DrawingVariables instance and updates it inside the
        /// _drawingModifier instance
        /// </summary>
        private void UpdateBrushMode()
        {
            _currentBrushMode = DrawingVariables.Instance.BrushMode;

            switch (_currentBrushMode)
            {
            case EBrushMode.Airbrush:
                _brushProperties = DrawingVariables.Instance.AirbrushMode;
                break;

            case EBrushMode.Inking:
                _brushProperties = DrawingVariables.Instance.InkingMode;
                break;

            case EBrushMode.Shading:
                _brushProperties = DrawingVariables.Instance.ShadingMode;
                break;

            case EBrushMode.Splatter:
                _brushProperties = DrawingVariables.Instance.SplatterMode;
                break;

            default:
                _brushProperties = DrawingVariables.Instance.AirbrushMode;
                break;
            }

            if (_drawingModifier != null)
            {
                _drawingModifier.UpdateProperties(_brushProperties);
            }
        }
コード例 #2
0
 public DrawingModifier(DrawingModificationProperties brushProperties, Transform stylusTransform,
                        Transform surfaceTransform)
 {
     _brushProperties  = brushProperties;
     _timer            = Stopwatch.StartNew();
     _stylusTransform  = stylusTransform;
     _surfaceTransform = surfaceTransform;
 }
コード例 #3
0
 public void UpdateProperties(DrawingModificationProperties brushProperties)
 {
     _brushProperties = brushProperties;
 }