Added IExecutable and ISlotContainer interface.
Changed SlotContainerNode to ExecutableNode
This commit is contained in:
@@ -9,7 +9,7 @@ namespace Misaki.GraphView
|
||||
|
||||
public void UpdateComputeOrder();
|
||||
|
||||
public void Execute(ReadOnlyCollection<SlotContainerNode> nodes);
|
||||
public void Execute(ReadOnlyCollection<DataNode> nodes);
|
||||
|
||||
public void Break();
|
||||
}
|
||||
|
||||
@@ -5,11 +5,11 @@ namespace Misaki.GraphView
|
||||
{
|
||||
public interface ILogger
|
||||
{
|
||||
public Action<SlotContainerNode, string, LogType> OnLog { get; set; }
|
||||
public Action<ExecutableNode, string, LogType> OnLog { get; set; }
|
||||
|
||||
public void LogInfo(SlotContainerNode node, string message);
|
||||
public void LogWarning(SlotContainerNode node, string message);
|
||||
public void LogError(SlotContainerNode node, string message);
|
||||
public void LogInfo(ExecutableNode node, string message);
|
||||
public void LogWarning(ExecutableNode node, string message);
|
||||
public void LogError(ExecutableNode node, string message);
|
||||
|
||||
public void ClearLogs();
|
||||
}
|
||||
|
||||
3
Runtime/Contracts/Nodes.meta
Normal file
3
Runtime/Contracts/Nodes.meta
Normal file
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6f808cfad7db49a4aecc5cf32d110d83
|
||||
timeCreated: 1730715252
|
||||
15
Runtime/Contracts/Nodes/IExecutable.cs
Normal file
15
Runtime/Contracts/Nodes/IExecutable.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
namespace Misaki.GraphView
|
||||
{
|
||||
public interface IExecutable
|
||||
{
|
||||
/// <summary>
|
||||
/// Execute the node.
|
||||
/// </summary>
|
||||
public void Execute();
|
||||
|
||||
/// <summary>
|
||||
/// Clear the execution flag.
|
||||
/// </summary>
|
||||
public void ClearExecutionFlag();
|
||||
}
|
||||
}
|
||||
3
Runtime/Contracts/Nodes/IExecutable.cs.meta
Normal file
3
Runtime/Contracts/Nodes/IExecutable.cs.meta
Normal file
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e01466f05b7b4e3f8037d2e28845da5c
|
||||
timeCreated: 1730715301
|
||||
30
Runtime/Contracts/Nodes/ISlotContainer.cs
Normal file
30
Runtime/Contracts/Nodes/ISlotContainer.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
namespace Misaki.GraphView
|
||||
{
|
||||
public interface ISlotContainer
|
||||
{
|
||||
/// <summary>
|
||||
/// Add the slot to the container.
|
||||
/// </summary>
|
||||
/// <param name="slot"> <see cref="Slot"/> The slot want to add </param>
|
||||
public void AddSlot(Slot slot);
|
||||
|
||||
/// <summary>
|
||||
/// Remove the slot from the container.
|
||||
/// </summary>
|
||||
/// <param name="slot"> <see cref="Slot"/> The slot want to remove </param>
|
||||
public void RemoveSlot(Slot slot);
|
||||
|
||||
/// <summary>
|
||||
/// Get the slot by the index and direction.
|
||||
/// </summary>
|
||||
/// <param name="index"> <see cref="int"/> Index of the slot</param>
|
||||
/// <param name="direction"> <see cref="SlotDirection"/> Direction of the slot </param>
|
||||
/// <returns> <see cref="Slot"/> The slot that matches the index and direction </returns>
|
||||
public Slot GetSlot(int index, SlotDirection direction);
|
||||
|
||||
/// <summary>
|
||||
/// Unlink all the slots of the node.
|
||||
/// </summary>
|
||||
public void UnlinkAllSlots();
|
||||
}
|
||||
}
|
||||
3
Runtime/Contracts/Nodes/ISlotContainer.cs.meta
Normal file
3
Runtime/Contracts/Nodes/ISlotContainer.cs.meta
Normal file
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3ed41f0fefcd4fa58cd60c6ccc6a5953
|
||||
timeCreated: 1730716599
|
||||
Reference in New Issue
Block a user