mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-13 05:48:35 +00:00
34 lines
683 B
C#
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
|
|
} |