blob: 3067ffdde03bbd9d0fdd48f0b58c8bf855061b13 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
using UnityEngine;
namespace BehaviorDesigner.Runtime.Tasks.Basic.Math
{
[TaskCategory("Basic/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;
}
}
}
|