mirror of
https://github.com/tym1116/BH3.git
synced 2025-12-12 22:44:35 +01:00
28 lines
750 B
C#
28 lines
750 B
C#
using BehaviorDesigner.Runtime.Tasks;
|
|
using UnityEngine;
|
|
|
|
namespace MoleMole
|
|
{
|
|
[TaskCategory("Basic/SharedVariable")]
|
|
[TaskDescription("Returns success if the variable value is equal to the compareTo value.")]
|
|
public class CompareSharedLayerMask : Conditional
|
|
{
|
|
[BehaviorDesigner.Runtime.Tasks.Tooltip("The first varible to compare")]
|
|
public SharedLayerMask variable;
|
|
|
|
[BehaviorDesigner.Runtime.Tasks.Tooltip("The variable to compare to")]
|
|
public SharedLayerMask compareTo;
|
|
|
|
public override TaskStatus OnUpdate()
|
|
{
|
|
return ((int)variable.Value != (int)compareTo.Value) ? TaskStatus.Failure : TaskStatus.Success;
|
|
}
|
|
|
|
public override void OnReset()
|
|
{
|
|
variable = default(LayerMask);
|
|
compareTo = default(LayerMask);
|
|
}
|
|
}
|
|
}
|