#if GRAPH_DESIGNER /// --------------------------------------------- /// Behavior Designer /// Copyright (c) Opsive. All Rights Reserved. /// https://www.opsive.com /// --------------------------------------------- namespace Opsive.BehaviorDesigner.Runtime.Tasks.Conditionals.Math { using Opsive.GraphDesigner.Runtime; using Opsive.GraphDesigner.Runtime.Variables; using UnityEngine; [NodeDescription("Compares two Vector2 values.")] [Shared.Utility.Category("Math")] public class Vector2Comparison : Conditional { [Tooltip("The first Vector2.")] [SerializeField] protected SharedVariable m_Vector1; [Tooltip("The second Vector2.")] [SerializeField] protected SharedVariable m_Vector2; /// /// Executes the task. /// /// The execution status of the task. public override TaskStatus OnUpdate() { return m_Vector1.Value == m_Vector2.Value ? TaskStatus.Success : TaskStatus.Failure; } } } #endif