private void OnLockEvent(ReGoapNodeEditor node, Event e) { if (e.isMouse && e.type == EventType.MouseDown && e.button == 0 && node.Rect.Contains(e.mousePosition)) { agentLocked = !agentLocked; } }
ReGoapNodeEditor DrawGenericNode(string title, float width, float height, GUIStyle style, ref Vector2 nodePosition, bool isSelected = false, ReGoapNodeEditor.ReGoapNodeEditorEvent onEvent = null) { var node = new ReGoapNodeEditor(title, nodePosition + totalDrag, width, height, style, isSelected, onEvent); nodes.Add(node); nodePosition += new Vector2(width, 0f); return(node); }
ReGoapNodeEditor DrawGenericNode(string text, float width, float height, GUIStyle style, ref Vector2 nodePosition) { var node = new ReGoapNodeEditor(nodePosition + totalDrag, width, height, style, selectedNodeStyle) { title = text }; nodes.Add(node); nodePosition += new Vector2(width, 0f); return(node); }