コード例 #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();
        }
コード例 #4
0
 //-----------------------------------------------------------------------------------
 public override void Init(CNFieldController controller, CommandNodeEditor ownerEditor)
 {
     Instance.minSize = new Vector2(minWidth, minHeight);
     View             = new CNFieldExtendedView(controller, ownerEditor);
     Controller       = controller;
 }
コード例 #5
0
        //-----------------------------------------------------------------------------------
        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);
        }
コード例 #6
0
 //-----------------------------------------------------------------------------------
 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);
        }