summaryrefslogtreecommitdiff
path: root/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Math/IsIntPositive.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Math/IsIntPositive.cs')
-rw-r--r--Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Math/IsIntPositive.cs20
1 files changed, 20 insertions, 0 deletions
diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Math/IsIntPositive.cs b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Math/IsIntPositive.cs
new file mode 100644
index 00000000..66fd1e7d
--- /dev/null
+++ b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Math/IsIntPositive.cs
@@ -0,0 +1,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;
+ }
+ }
+} \ No newline at end of file