1
0
mirror of https://github.com/Artemis-RGB/Artemis synced 2025-12-13 05:48:35 +00:00
Robert 0058322936 Nodes - Lock nodes while resetting
Nodes - Added more boolean operators
Nodes - Fix number comparisons
2021-09-29 21:43:12 +02:00

92 lines
2.1 KiB
C#

using Artemis.Core;
using Artemis.VisualScripting.Nodes.CustomViewModels;
namespace Artemis.VisualScripting.Nodes
{
[Node("Integer-Value", "Outputs a configurable static integer value.", "Static", OutputType = typeof(int))]
public class StaticIntegerValueNode : Node<int, StaticIntegerValueNodeCustomViewModel>
{
#region Properties & Fields
public OutputPin<int> Output { get; }
#endregion
#region Constructors
public StaticIntegerValueNode()
: base("Integer", "Outputs an configurable integer value.")
{
Output = CreateOutputPin<int>();
}
#endregion
#region Methods
public override void Evaluate()
{
Output.Value = Storage;
}
#endregion
}
[Node("Float-Value", "Outputs a configurable static float value.", "Static", OutputType = typeof(float))]
public class StaticFloatValueNode : Node<float, StaticFloatValueNodeCustomViewModel>
{
#region Properties & Fields
public OutputPin<float> Output { get; }
#endregion
#region Constructors
public StaticFloatValueNode()
: base("Float", "Outputs a configurable float value.")
{
Output = CreateOutputPin<float>();
}
#endregion
#region Methods
public override void Evaluate()
{
Output.Value = Storage;
}
#endregion
}
[Node("String-Value", "Outputs a configurable static string value.", "Static", OutputType = typeof(string))]
public class StaticStringValueNode : Node<string, StaticStringValueNodeCustomViewModel>
{
#region Properties & Fields
public OutputPin<string> Output { get; }
#endregion
#region Constructors
public StaticStringValueNode()
: base("String", "Outputs a configurable string value.")
{
Output = CreateOutputPin<string>();
}
#endregion
#region Methods
public override void Evaluate()
{
Output.Value = Storage;
}
#endregion
}
}