1
0
mirror of https://github.com/Artemis-RGB/Artemis synced 2025-12-13 05:48:35 +00:00
2022-03-30 20:10:43 +02:00

34 lines
683 B
C#

using Artemis.Core;
namespace Artemis.VisualScripting.Nodes.Operators;
[Node("Negate", "Negates the boolean.", "Operators", InputType = typeof(bool), OutputType = typeof(bool))]
public class NegateNode : Node
{
#region Constructors
public NegateNode()
: base("Negate", "Negates the boolean.")
{
Input = CreateInputPin<bool>();
Output = CreateOutputPin<bool>();
}
#endregion
#region Methods
public override void Evaluate()
{
Output.Value = !Input.Value;
}
#endregion
#region Properties & Fields
public InputPin<bool> Input { get; }
public OutputPin<bool> Output { get; }
#endregion
}