Exemplo n.º 1
0
        /// <summary>
        /// Initializes values of the Node
        /// </summary>
        /// <param name="editor"></param>
        /// <param name="position"></param>
        /// <param name="width"></param>
        /// <param name="height"></param>
        /// <param name="numOfInPoints"></param>
        /// <param name="numOfOutPoints"></param>
        public void SetUp(NodeEditorBase <T, TData> editor, Vector2 position, float width, float height, int numOfInPoints, int numOfOutPoints)
        {
            ID = -1;

            Editor   = editor;
            NodeRect = new Rect(position.x, position.y, width, height);

            InPoints  = new ConnectionPoint <T, TData> [numOfInPoints];
            OutPoints = new ConnectionPoint <T, TData> [numOfOutPoints];

            _whiteText = new GUIStyle();
            _whiteText.normal.textColor = Color.white;

            _preferredHeight = height;

            GUI.changed = true;
        }
Exemplo n.º 2
0
 /// <summary>
 /// Initializes values of the Node
 /// </summary>
 /// <param name="editor"></param>
 /// <param name="id"></param>
 /// <param name="position"></param>
 /// <param name="width"></param>
 /// <param name="height"></param>
 /// <param name="numOfInPoints"></param>
 /// <param name="numOfOutPoints"></param>
 public void SetUp(NodeEditorBase <T, TData> editor, int id, Vector2 position, float width, float height, int numOfInPoints, int numOfOutPoints)
 {
     SetUp(editor, position, width, height, numOfInPoints, numOfOutPoints);
     ID = id;
 }