Skip to content
This repository has been archived by the owner on Feb 11, 2024. It is now read-only.

Commit

Permalink
Renamed "Build Torus" to "Curved Wall" indicating the intended usage …
Browse files Browse the repository at this point in the history
…more clearly.
  • Loading branch information
Henry00IS committed Jan 30, 2018
1 parent 526fe5c commit 6c9e1d6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions Scripts/Brushes/CompoundBrushes/CurvedStairBrush.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ public class CurvedStairBrush : CompoundBrush
[SerializeField]
bool fillToBottom = true;

/// <summary>Whether to generate stairs or a torus shape.</summary>
/// <summary>Whether to generate stairs or a curved wall.</summary>
[SerializeField]
bool buildTorus = false;
bool curvedWall = false;

/// <summary>Whether the floor is stairs or a smooth slope.</summary>
[SerializeField]
Expand Down Expand Up @@ -143,7 +143,7 @@ public override void Invalidate (bool polygonsChanged)

newVertex = Quaternion.Euler(rotateStep * x) * vertex;
vertexPositions.Add(new Vector3(newVertex.x, vertex.z - adjustment, newVertex.y));
if (buildTorus)
if (curvedWall)
vertex.z = stepHeight * numSteps;
else
vertex.z += stepHeight;
Expand All @@ -163,7 +163,7 @@ public override void Invalidate (bool polygonsChanged)

newVertex = Quaternion.Euler(rotateStep * x) * vertex;
vertexPositions.Add(new Vector3(newVertex.x, vertex.z - adjustment, newVertex.y));
if (buildTorus)
if (curvedWall)
vertex.z = stepHeight * numSteps;
else
vertex.z += stepHeight;
Expand Down Expand Up @@ -205,7 +205,7 @@ public override void Invalidate (bool polygonsChanged)
}

// we force NoCSG mode if special NoCSG operators are used.
if (buildTorus) { slopedFloor = false; slopedCeiling = false; }
if (curvedWall) { slopedFloor = false; slopedCeiling = false; }
if (fillToBottom) { slopedCeiling = false; }
if (slopedFloor || slopedCeiling)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class CurvedStairBrushInspector : CompoundBrushInspector
SerializedProperty addToFirstStep;
SerializedProperty counterClockwise;
SerializedProperty fillToBottom;
SerializedProperty buildTorus;
SerializedProperty curvedWall;
SerializedProperty slopedFloor;
SerializedProperty slopedCeiling;

Expand All @@ -35,7 +35,7 @@ protected override void OnEnable()
addToFirstStep = serializedObject.FindProperty("addToFirstStep");
counterClockwise = serializedObject.FindProperty("counterClockwise");
fillToBottom = serializedObject.FindProperty("fillToBottom");
buildTorus = serializedObject.FindProperty("buildTorus");
curvedWall = serializedObject.FindProperty("curvedWall");
slopedFloor = serializedObject.FindProperty("slopedFloor");
slopedCeiling = serializedObject.FindProperty("slopedCeiling");
}
Expand Down Expand Up @@ -108,15 +108,15 @@ public override void OnInspectorGUI()
if (fillToBottom.boolValue != oldBool)
ApplyAndInvalidate();

buildTorus.boolValue = GUILayout.Toggle(oldBool = buildTorus.boolValue, "Build Torus", EditorStyles.toolbarButton);
if (buildTorus.boolValue != oldBool)
curvedWall.boolValue = GUILayout.Toggle(oldBool = curvedWall.boolValue, "Curved Wall", EditorStyles.toolbarButton);
if (curvedWall.boolValue != oldBool)
ApplyAndInvalidate();

EditorGUILayout.EndHorizontal();
}

// can only use nocsg slopes if build torus is disabled.
if (!buildTorus.boolValue)
if (!curvedWall.boolValue)
{
using (new NamedVerticalScope("Curved Stair: NoCSG Operators"))
{
Expand Down

0 comments on commit 6c9e1d6

Please sign in to comment.