clean code
This commit is contained in:
@@ -153,9 +153,7 @@ namespace FlaxEditor.Tools.Terrain
|
||||
// Increase or decrease brush size with scroll
|
||||
if (Input.GetKey(KeyboardKeys.Shift))
|
||||
{
|
||||
var currentBrush = Mode.CurrentBrush;
|
||||
currentBrush.Size += dt * currentBrush.Size * Input.Mouse.ScrollDelta * 5f;
|
||||
Mode.CurrentBrush = currentBrush;
|
||||
Mode.CurrentBrush.Size += dt * Mode.CurrentBrush.Size * Input.Mouse.ScrollDelta * 5f;
|
||||
}
|
||||
|
||||
// Check if no terrain is selected
|
||||
|
||||
@@ -139,9 +139,9 @@ namespace FlaxEditor.Tools.Terrain
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or set the current brush.
|
||||
/// Gets the current brush.
|
||||
/// </summary>
|
||||
public Brush CurrentBrush { get => _brushes[(int)_brushType]; set => _brushes[(int)_brushType] = value; }
|
||||
public Brush CurrentBrush => _brushes[(int)_brushType];
|
||||
|
||||
/// <summary>
|
||||
/// Gets the circle brush instance.
|
||||
|
||||
@@ -161,9 +161,7 @@ namespace FlaxEditor.Tools.Terrain
|
||||
// Increase or decrease brush size with scroll
|
||||
if (Input.GetKey(KeyboardKeys.Shift))
|
||||
{
|
||||
var currentBrush = Mode.CurrentBrush;
|
||||
currentBrush.Size += dt * currentBrush.Size * Input.Mouse.ScrollDelta * 5f;
|
||||
Mode.CurrentBrush = currentBrush;
|
||||
Mode.CurrentBrush.Size += dt * Mode.CurrentBrush.Size * Input.Mouse.ScrollDelta * 5f;
|
||||
}
|
||||
|
||||
// Check if selected terrain was changed during painting
|
||||
|
||||
@@ -158,9 +158,9 @@ namespace FlaxEditor.Tools.Terrain
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or set the current brush.
|
||||
/// Gets the current brush.
|
||||
/// </summary>
|
||||
public Brush CurrentBrush { get => _brushes[(int)_brushType]; set => _brushes[(int)_brushType] = value; }
|
||||
public Brush CurrentBrush => _brushes[(int)_brushType];
|
||||
|
||||
/// <summary>
|
||||
/// Gets the circle brush instance.
|
||||
|
||||
Reference in New Issue
Block a user