Skip to content

Commit

Permalink
Code Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
meniku committed Dec 22, 2016
1 parent d5696e6 commit 8f23527
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions Editor/DebuggerWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace NPBehave
public class DebuggerWindow : EditorWindow
{
private const int nestedPadding = 10;

public static Transform selectedObject;
public static Debugger selectedDebugger;

Expand Down Expand Up @@ -60,15 +60,15 @@ public void Init()

defaultColor = EditorGUIUtility.isProSkin ? Color.white : Color.black;
}

public void OnSelectionChange()
{
selectedObject = Selection.activeTransform;
if (selectedObject!=null) selectedDebugger = selectedObject.GetComponentInChildren<Debugger>();
if (selectedObject != null) selectedDebugger = selectedObject.GetComponentInChildren<Debugger>();

Repaint();
}

public void OnGUI()
{
if (nameToTagString == null) Init(); // Weird recompile bug fix
Expand All @@ -88,7 +88,7 @@ public void OnGUI()
if (newDebugger != selectedDebugger)
{
selectedDebugger = newDebugger;
if (newDebugger!=null) selectedObject = selectedDebugger.transform;
if (newDebugger != null) selectedObject = selectedDebugger.transform;
}

if (selectedObject == null)
Expand All @@ -107,7 +107,7 @@ public void OnGUI()
EditorGUILayout.HelpBox("BehavorTree is null", MessageType.Info);
return;
}

EditorGUILayout.BeginScrollView(scrollPosition);

GUILayout.BeginHorizontal();
Expand Down Expand Up @@ -211,7 +211,7 @@ private void DrawNodeTree(Node node, int depth = 0, bool firstNode = true, float
if (node is Container)
{
EditorGUILayout.BeginVertical(nestedBoxStyle);

Node[] children = (node as Container).DebugChildren;
if (children == null)
{
Expand Down Expand Up @@ -247,7 +247,7 @@ private void DrawNode(Node node, int depth)
{
BlackboardCondition nodeBlackboardCond = node as BlackboardCondition;
tagName = nodeBlackboardCond.Key + " " + operatorToString[nodeBlackboardCond.Operator] + " " + nodeBlackboardCond.Value;
GUI.backgroundColor = new Color(0.9f,0.9f, 0.6f);
GUI.backgroundColor = new Color(0.9f, 0.9f, 0.6f);
}
else
{
Expand All @@ -268,7 +268,7 @@ private void DrawNode(Node node, int depth)

// Draw Label
if (!string.IsNullOrEmpty(node.Label)) GUILayout.Label(" " + node.Label, (GUIStyle)"ChannelStripAttenuationMarkerSquare");

GUILayout.FlexibleSpace();

// Draw Buttons
Expand All @@ -290,7 +290,7 @@ private void DrawNode(Node node, int depth)
}

// Draw Stats
GUILayout.Label((node.DebugNumStoppedCalls > 0 ? node.DebugLastResult.ToString() : "") + " | "+ node.DebugNumStartCalls + " , " + node.DebugNumStopCalls + " , " + node.DebugNumStoppedCalls, smallTextStyle);
GUILayout.Label((node.DebugNumStoppedCalls > 0 ? node.DebugLastResult.ToString() : "") + " | " + node.DebugNumStartCalls + " , " + node.DebugNumStopCalls + " , " + node.DebugNumStoppedCalls, smallTextStyle);
}

EditorGUILayout.EndHorizontal();
Expand All @@ -300,7 +300,7 @@ private void DrawNode(Node node, int depth)
Handles.color = (node.CurrentState == Node.State.ACTIVE) ? new Color(0f, 0f, 0f, 1f) : new Color(0f, 0f, 0f, 0.3f);
Handles.BeginGUI();
float midY = (rect.yMin + rect.yMax) / 2f;
Handles.DrawLine(new Vector2(rect.xMin-5, midY), new Vector2(rect.xMin, midY));
Handles.DrawLine(new Vector2(rect.xMin - 5, midY), new Vector2(rect.xMin, midY));
Handles.EndGUI();
}
}
Expand Down

0 comments on commit 8f23527

Please sign in to comment.