blob: 66fd1e7d060e8beb7e1f570502a0b6bf15e6d1e5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
namespace BehaviorDesigner.Runtime.Tasks.Basic.Math
{
[TaskCategory("Basic/Math")]
[TaskDescription("Is the int a positive value?")]
public class IsIntPositive : Conditional
{
[Tooltip("The int to check if positive")]
public SharedInt intVariable;
public override TaskStatus OnUpdate()
{
return intVariable.Value > 0 ? TaskStatus.Success : TaskStatus.Failure;
}
public override void OnReset()
{
intVariable = 0;
}
}
}
|