| | |
| | | var _root = target as SoProcessNode; |
| | | |
| | | int _removeIndex = -1; |
| | | int _insertIndex = -1; |
| | | |
| | | SoProcessNode.Node _node = null; |
| | | for (int i = 0; i < _root.nodeList.Count; ++i) |
| | |
| | | _Item(ref _node, "表演动画"); |
| | | } |
| | | EditorGUILayout.EndVertical(); |
| | | if (GUILayout.Button("删除", GUILayout.Height(22))) |
| | | EditorGUILayout.BeginVertical(); |
| | | if (GUILayout.Button("删除", GUILayout.Height(20))) |
| | | { |
| | | _removeIndex = i; |
| | | } |
| | | if (GUILayout.Button("插入", GUILayout.Height(20))) |
| | | { |
| | | _insertIndex = i; |
| | | } |
| | | EditorGUILayout.EndVertical(); |
| | | EditorGUILayout.EndHorizontal(); |
| | | } |
| | | |
| | |
| | | _root.nodeList.RemoveAt(_removeIndex); |
| | | } |
| | | |
| | | if (_insertIndex != -1) |
| | | { |
| | | _root.nodeList.Insert(_insertIndex, new SoProcessNode.Node()); |
| | | } |
| | | |
| | | if (GUILayout.Button("增加流程节点", guiSkin.button, GUILayout.Height(32))) |
| | | { |
| | | _root.nodeList.Add(new SoProcessNode.Node()); |