Skip to content

Commit

Permalink
Optimize scripts.
Browse files Browse the repository at this point in the history
  • Loading branch information
mogoson committed Dec 15, 2017
1 parent 250de63 commit 8c52f5c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions Assets/MGS-Machinery/Editor/Hinge/CrankRockerEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,10 @@ protected override void OnSceneGUI()
DrawPositionHandle(script.rocker.transform);
DrawPositionHandle(script.lrJoint);
}

if (script.editMode == EditMode.Hinge)
else if (script.editMode == EditMode.Hinge)
{
DrawRotationHandle(script.crank.transform);
}

DrawCircleCap(script.crank.transform.position, script.crank.transform.rotation, areaRadius);
DrawArrow(script.crank.transform.position, script.crank.transform.forward, arrowLength, nodeSize, "Axis", blue);
Expand Down
5 changes: 3 additions & 2 deletions Assets/MGS-Machinery/Editor/Hinge/CrankSliderEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,10 @@ protected override void OnSceneGUI()
DrawPositionHandle(script.lsJoint);
DrawRotationHandle(script.lsJoint);
}

if (script.editMode == EditMode.Hinge)
else if (script.editMode == EditMode.Hinge)
{
DrawRotationHandle(script.crank.transform);
}

DrawSphereCap(script.crank.transform.position, Quaternion.identity, nodeSize);
DrawCircleCap(script.crank.transform.position, script.crank.transform.rotation, areaRadius);
Expand Down

0 comments on commit 8c52f5c

Please sign in to comment.