mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 11:56:30 +00:00
Added first visual-scripting draft [WIP]
This commit is contained in:
1 parent
719d95bd33
commit
a45dd094a0
56 files changed
+5139
-21
No files matched your search
@@ -0,0 +1,40 @@
|
||||
using Artemis.Core.VisualScripting;
|
||||
using Artemis.VisualScripting.Model;
|
||||
|
||||
namespace Artemis.VisualScripting.Internal
|
||||
{
|
||||
internal interface IExitNode : INode
|
||||
{ }
|
||||
|
||||
internal class ExitNode<T> : Node, IExitNode
|
||||
{
|
||||
#region Properties & Fields
|
||||
|
||||
public InputPin<T> Input { get; }
|
||||
|
||||
public T Value { get; private set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
|
||||
public ExitNode(string name, string description = "")
|
||||
{
|
||||
this.Name = name;
|
||||
this.Description = description;
|
||||
|
||||
Input = CreateInputPin<T>();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
|
||||
public override void Evaluate()
|
||||
{
|
||||
Value = Input.Value;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
using System;
|
||||
using Artemis.VisualScripting.Model;
|
||||
|
||||
namespace Artemis.VisualScripting.Internal
|
||||
{
|
||||
internal class IsConnectingPin : Pin
|
||||
{
|
||||
#region Properties & Fields
|
||||
|
||||
public override PinDirection Direction { get; }
|
||||
public override Type Type { get; } = typeof(object);
|
||||
public override object PinValue => null;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
|
||||
public IsConnectingPin(PinDirection direction)
|
||||
: base(null, null)
|
||||
{
|
||||
this.Direction = direction;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user