mirror of
https://github.com/GTA-ASM/SanAndreasUnity
synced 2024-11-26 22:10:17 +00:00
rename
This commit is contained in:
parent
ec991ee991
commit
8dedafd824
1 changed files with 11 additions and 11 deletions
|
@ -12,8 +12,8 @@ namespace SanAndreasUnity.Editor
|
||||||
{
|
{
|
||||||
private static bool _foldoutCurrent = true;
|
private static bool _foldoutCurrent = true;
|
||||||
private static bool _foldoutTarget = true;
|
private static bool _foldoutTarget = true;
|
||||||
private static bool _foldoutAdjacentCurrent = true;
|
private static bool _foldoutLinkedCurrent = true;
|
||||||
private static bool _foldoutAdjacentTarget = true;
|
private static bool _foldoutLinkedTarget = true;
|
||||||
|
|
||||||
|
|
||||||
public override void OnInspectorGUI()
|
public override void OnInspectorGUI()
|
||||||
|
@ -24,11 +24,11 @@ namespace SanAndreasUnity.Editor
|
||||||
|
|
||||||
GUILayout.Space (10);
|
GUILayout.Space (10);
|
||||||
|
|
||||||
DrawForNode(pedAI.CurrentNode, "Current node:", ref _foldoutCurrent, true, ref _foldoutAdjacentCurrent);
|
DrawForNode(pedAI.CurrentNode, "Current node", ref _foldoutCurrent, true, ref _foldoutLinkedCurrent);
|
||||||
DrawForNode(pedAI.TargetNode, "Target node:", ref _foldoutTarget, true, ref _foldoutAdjacentTarget);
|
DrawForNode(pedAI.TargetNode, "Target node", ref _foldoutTarget, true, ref _foldoutLinkedTarget);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DrawForNode(PathNode node, string labelText, ref bool foldout, bool showAdjacentNodes, ref bool foldoutAdjacent)
|
void DrawForNode(PathNode node, string labelText, ref bool foldout, bool showLinkedNodes, ref bool foldoutLinked)
|
||||||
{
|
{
|
||||||
if (!string.IsNullOrWhiteSpace(labelText))
|
if (!string.IsNullOrWhiteSpace(labelText))
|
||||||
foldout = EditorGUILayout.Foldout(foldout, labelText, true);
|
foldout = EditorGUILayout.Foldout(foldout, labelText, true);
|
||||||
|
@ -41,16 +41,16 @@ namespace SanAndreasUnity.Editor
|
||||||
|
|
||||||
EditorUtils.DrawFieldsAndPropertiesInInspector(node, 0);
|
EditorUtils.DrawFieldsAndPropertiesInInspector(node, 0);
|
||||||
|
|
||||||
if (showAdjacentNodes)
|
if (showLinkedNodes)
|
||||||
{
|
{
|
||||||
foldoutAdjacent = EditorGUILayout.Foldout(foldoutAdjacent, "Adjacent nodes:", true);
|
foldoutLinked = EditorGUILayout.Foldout(foldoutLinked, "Linked nodes", true);
|
||||||
if (foldoutAdjacent)
|
if (foldoutLinked)
|
||||||
{
|
{
|
||||||
foreach (var adjacentNode in NodeReader.GetAllLinkedNodes(node))
|
foreach (var linkedNode in NodeReader.GetAllLinkedNodes(node))
|
||||||
{
|
{
|
||||||
bool f = true;
|
bool f = true;
|
||||||
bool fAdjacent = false;
|
bool fLinked = false;
|
||||||
DrawForNode(adjacentNode, "", ref f, false, ref fAdjacent);
|
DrawForNode(linkedNode, "", ref f, false, ref fLinked);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue