blob: b1a9f3e4c512aacc7c773753fb0e4e68d952a9aa (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
using UnityEngine;
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;
}
}
}
|