using System; using System.Collections.Generic; namespace UnityEngine.Graphing { public enum ModificationScope { Nothing = 0, Node = 1, Graph = 2, Topological = 3 } public delegate void OnNodeModified(INode node, ModificationScope scope); public delegate void OnNodeReplaced(INode previous, INode current); public interface INode { OnNodeModified onModified { get; set; } OnNodeReplaced onReplaced { get; set; } IGraph owner { get; set; } Guid guid { get; } Guid RewriteGuid(); string name { get; set; } bool canDeleteNode { get; } IEnumerable GetInputSlots() where T : ISlot; IEnumerable GetOutputSlots() where T : ISlot; IEnumerable GetSlots() where T : ISlot; void AddSlot(ISlot slot); void RemoveSlot(int slotId); SlotReference GetSlotReference(int slotId); T FindSlot(int slotId) where T : ISlot; T FindInputSlot(int slotId) where T : ISlot; T FindOutputSlot(int slotId) where T : ISlot; IEnumerable GetInputsWithNoConnection(); DrawState drawState { get; set; } bool hasError { get; } void ValidateNode(); void UpdateNodeAfterDeserialization(); } }