public void SetInputJoint(LinkJoint inputJoint) { //this.inputJoint = inputJoint; if (null == this.inputJoint) { this.inputJoint = inputJoint; this.inputCurveRect = inputJoint.outputRect; } else { } }
internal void SetCurrentLinkJoint(LinkJoint ljoint) { if (this.currJoint != null) { this.currJoint.SetInputJoint(ljoint); this.currJoint = null; } else { this.currJoint = ljoint; } }
public override void DrawGraph(int id) { //base.DrawGraph( id ); GraphTitle = EditorGUILayout.TextField(GraphTitle); EditorGUILayout.BeginHorizontal(); if (GUILayout.Button("Add " + t.GetType())) { models.Add(t); LinkJoint ljoint = new LinkJoint(this, (joints.Count + 4) * EditorGUIUtility.singleLineHeight, EditorGUIUtility.singleLineHeight); ljoint.OnClickInput = OnClickInput; ljoint.OnClickOutput = OnClickOutput; joints.Add(ljoint); } if (GUILayout.Button("Sub")) { models.RemoveAt(models.Count - 1); models.TrimExcess(); } EditorGUILayout.EndHorizontal(); for (int i = 0; i < models.Count; i++) { if (t is string) { List <string> std = models as List <string>; std[i] = joints[i].DrawString(std[i]); } else if (t is int) { List <int> std = models as List <int>; std[i] = joints[i].DrawInt(std[i]); } else if (t is float) { List <float> std = models as List <float>; std[i] = joints[i].DrawFloat(std[i]); } else if (t is Object) { List <Object> std = models as List <Object>; //std[i] = joints[i].DrawFloat( std[i] ); //std[i] = EditorGUI.ObjectField( new Rect( 5, ( i + 4 ) * EditorGUIUtility.singleLineHeight, 200 - 30, EditorGUIUtility.singleLineHeight ), std[i] ); } joints[i].DrawJoint(); joints[i].DrawCurves(); } }