ProjectDDD/Assets/External/Behavior Designer/Runtime/Tasks/Unity/Math/BoolFlip.cs
2025-07-07 19:25:56 +09:00

21 lines
540 B (Stored with Git LFS)
C#

namespace BehaviorDesigner.Runtime.Tasks.Unity.Math
{
[TaskCategory("Unity/Math")]
[TaskDescription("Flips the value of the bool.")]
public class BoolFlip : Action
{
[Tooltip("The bool to flip the value of")]
public SharedBool boolVariable;
public override TaskStatus OnUpdate()
{
boolVariable.Value = !boolVariable.Value;
return TaskStatus.Success;
}
public override void OnReset()
{
boolVariable.Value = false;
}
}
}