blob: 9a106fde2faf293f0929803c122815b26eac9250 (
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 float a positive value?")]
public class IsFloatPositive : Conditional
{
[Tooltip("The float to check if positive")]
public SharedFloat floatVariable;
public override TaskStatus OnUpdate()
{
return floatVariable.Value > 0 ? TaskStatus.Success : TaskStatus.Failure;
}
public override void OnReset()
{
floatVariable = 0;
}
}
}
|