public void DrawCurves() { foreach (InterfaceType input in inputs) { if (input.connectedNode) { Vector2 outPos = input.connectedNode.GetOutputPos(input.connectedIndex); Rect start = new Rect() { x = outPos.x, y = outPos.y, width = 1, height = 1 }; Rect end = new Rect() { x = 7f + WindowRect.x, y = height * input.yPos + WindowRect.y, width = 1, height = 1 }; BossEditor.DrawCurve(start, end); } } }
private static bool LoadBossEditorIfBossCreatorObjectSelected(int instanceID, int line) { Object obj = EditorUtility.InstanceIDToObject(instanceID); if (EditorUtility.InstanceIDToObject(instanceID).GetType() == typeof(BossCreator)) { BossEditor editor = EditorWindow.GetWindow <BossEditor>(desiredDockNextTo: typeof(SceneView)); editor.BossCreatorObject = (BossCreator)obj; editor.LoadBoss(); foreach (var node in editor.BossCreatorObject.Nodes) { Debug.Log(node.WindowTitle); } } return(false); }
private static void ShowEditor() { BossEditor editor = GetWindow <BossEditor>(); editor.stopwatch.Start(); }
public BossNodeFactory(BossEditor editor) { _editor = editor; BossEditorEvents.OnCreateNode += CreateNode; }
public BossEditorMouseInput(BossEditor editor) { _editor = editor; }