Updated RelayNode;
Added ISlot interface; Added ProxySlot;
This commit is contained in:
52
Runtime/Attributes/ISlot.cs
Normal file
52
Runtime/Attributes/ISlot.cs
Normal file
@@ -0,0 +1,52 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Misaki.GraphView
|
||||
{
|
||||
public interface ISlot
|
||||
{
|
||||
public SlotData SlotData
|
||||
{
|
||||
get;
|
||||
}
|
||||
|
||||
public List<SlotData> LinkedSlotDatas
|
||||
{
|
||||
get;
|
||||
}
|
||||
|
||||
public bool IsLinked
|
||||
{
|
||||
get;
|
||||
}
|
||||
|
||||
public DataNode Owner
|
||||
{
|
||||
get;
|
||||
}
|
||||
|
||||
public object Data
|
||||
{
|
||||
get;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Link the current slot with another slot.
|
||||
/// </summary>
|
||||
/// <param name="other"> <see cref="ISlot"/> The slot need to be linked </param>
|
||||
/// <param name="connection"> <see cref="SlotConnection"/> The connection that created when link </param>
|
||||
/// <returns> True if the link action is succeed, otherwise false </returns>
|
||||
public bool Link(ISlot other, out SlotConnection connection);
|
||||
|
||||
/// <summary>
|
||||
/// Unlink the current slot with another slot.W
|
||||
/// </summary>
|
||||
/// <param name="other"> <see cref="ISlot"/> The slot need to be unlinked </param>
|
||||
public void Unlink(ISlot other);
|
||||
|
||||
/// <summary>
|
||||
/// Send data to the slot.
|
||||
/// </summary>
|
||||
/// <param name="data"> The data want to send </param>
|
||||
public void ReceiveData(object data);
|
||||
}
|
||||
}
|
||||
2
Runtime/Attributes/ISlot.cs.meta
Normal file
2
Runtime/Attributes/ISlot.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 33754a5a556e98d468f1bb3aef689de6
|
||||
Reference in New Issue
Block a user