예제 #1
0
파일: AMoPUtils.cs 프로젝트: chadrc/AMoP
    public static EditNodeRow GetEditNodeRow(List <EditorBoardNodeBehavior> editNodes, float x, float y)
    {
        List <MonoBehaviour> behaviorList = new List <MonoBehaviour> ();

        foreach (var n in editNodes)
        {
            behaviorList.Add(n);
        }

        var row = GetBehaviorRow(behaviorList, x, y);

        var hidden = new List <EditorBoardNodeBehavior> ();

        foreach (var b in row.Hidden)
        {
            hidden.Add((EditorBoardNodeBehavior)b);
        }

        EditorBoardNodeBehavior closest = null;

        try
        {
            closest = (EditorBoardNodeBehavior)row.Closest;
        }
        catch (System.Exception)
        {
        }

        return(new EditNodeRow(closest, hidden));
    }
예제 #2
0
파일: BoardEditor.cs 프로젝트: chadrc/AMoP
    private void OnNodeEdited(EditorBoardNodeBehavior editNode, bool delete)
    {
        if (delete)
        {
            _boardData.RemoveNode(editNode.NodeIndex);
            _editNodes.Remove(editNode);
            GameObject.DestroyImmediate(editNode.gameObject);

            int index = 0;
            for (int i = 0; i < _editNodes.Count; i++)
            {
                _editNodes [index].SetData(index, _boardData);
            }
        }

        HideShowNodes();
        EditorUtility.SetDirty(this);
    }
예제 #3
0
 void OnFocus()
 {
     node = (EditorBoardNodeBehavior)target;
 }
예제 #4
0
 void OnEnable()
 {
     node = (EditorBoardNodeBehavior)target;
 }
예제 #5
0
파일: AMoPUtils.cs 프로젝트: chadrc/AMoP
 public EditNodeRow(EditorBoardNodeBehavior closest, List <EditorBoardNodeBehavior> hidden)
 {
     Closest = closest;
     Hidden  = hidden;
 }