示例#1
0
        //-----------------------------------------------------------------------------------
        public CNFieldView(CNFieldController controller, CommandNodeEditor ownerEditor)
        {
            Controller        = controller;
            selectionListBox_ = new CRListBox(Controller, "FieldLB", false);
            ownerNode_        = ownerEditor.Data;

            Controller.WantsUpdate += controller.BuildListItems;
        }
示例#2
0
        //-----------------------------------------------------------------------------------
        public CNFieldExtendedView(CNFieldController controller, CommandNodeEditor ownerEditor) :
            base(controller, ownerEditor)
        {
            nodesController_ = new CNNodesController(controller, ownerEditor);
            nodesListBox_    = new CRListBox(nodesController_, "FieldnodesLB", true);
            field_           = controller.Field;

            controller.WantsUpdate += nodesController_.SetSelectableNodes;
        }
示例#3
0
        //-----------------------------------------------------------------------------------
        public CNNodesController(CNFieldController fController, CommandNodeEditor ownerEditor)
        {
            fController_ = fController;
            field_       = fController.Field;
            manager_     = CNManager.Instance;
            hierarchy_   = manager_.Hierarchy;
            ownerNode_   = ownerEditor.Data;

            listCommandNodeAllowed_ = new List <CommandNode>();
            listCommandNodeCurrent_ = new List <CommandNode>();

            listSelectedIdx_ = new List <int>();
            listTreeNodeAux_ = new List <CRTreeNode>();

            SetSelectableNodes();
        }
 //-----------------------------------------------------------------------------------
 public override void Init(CNFieldController controller, CommandNodeEditor ownerEditor)
 {
     Instance.minSize = new Vector2(minWidth, minHeight);
     View             = new CNFieldExtendedView(controller, ownerEditor);
     Controller       = controller;
 }
        //-----------------------------------------------------------------------------------
        public static CNFieldWindow ShowWindow <T>(string windowName, CNFieldController controller, CommandNodeEditor ownerEditor)
            where T : CNFieldWindow
        {
            if (IsOpen)
            {
                Instance.Close();
            }

            Instance = EditorWindow.GetWindow <T>(true, windowName, true);
            Instance.Init(controller, ownerEditor);

            return(Instance);
        }
 //-----------------------------------------------------------------------------------
 public abstract void Init(CNFieldController controller, CommandNodeEditor ownerEditor);
示例#7
0
        public void ApplyDragAction(CommandNode node, CommandNodeEditor nodeEditor, UnityEngine.Object[] arrDraggedObjects)
        {
            Type nodeType = node.GetType();

            @switchDragAction[nodeType](nodeEditor, arrDraggedObjects);
        }