A game about forced loneliness, made by TACStudios
1using UnityEngine; 2 3namespace Unity.VisualScripting 4{ 5 /// <summary> 6 /// Compares two inputs to determine whether they are equal. 7 /// </summary> 8 [UnitCategory("Logic")] 9 [UnitOrder(5)] 10 public sealed class Equal : BinaryComparisonUnit 11 { 12 public Equal() : base() 13 { 14 numeric = false; 15 } 16 17 // Backward compatibility 18 protected override string outputKey => "equal"; 19 20 /// <summary> 21 /// Whether A is equal to B. 22 /// </summary> 23 [DoNotSerialize] 24 [PortLabel("A = B")] 25 [PortKey("equal")] 26 public override ValueOutput comparison => base.comparison; 27 28 protected override bool NumericComparison(float a, float b) 29 { 30 return Mathf.Approximately(a, b); 31 } 32 33 protected override bool GenericComparison(object a, object b) 34 { 35 return OperatorUtility.Equal(a, b); 36 } 37 } 38}