diff options
Diffstat (limited to 'Client/Assets/Behavior Designer/Runtime/Basic Tasks/Math/IsIntPositive.cs')
-rw-r--r-- | Client/Assets/Behavior Designer/Runtime/Basic Tasks/Math/IsIntPositive.cs | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/Client/Assets/Behavior Designer/Runtime/Basic Tasks/Math/IsIntPositive.cs b/Client/Assets/Behavior Designer/Runtime/Basic Tasks/Math/IsIntPositive.cs new file mode 100644 index 00000000..433e60f7 --- /dev/null +++ b/Client/Assets/Behavior Designer/Runtime/Basic Tasks/Math/IsIntPositive.cs @@ -0,0 +1,22 @@ +using UnityEngine;
+
+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 |