diff options
Diffstat (limited to 'Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Math/FloatClamp.cs')
-rw-r--r-- | Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Math/FloatClamp.cs | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Math/FloatClamp.cs b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Math/FloatClamp.cs deleted file mode 100644 index 89f406b9..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Math/FloatClamp.cs +++ /dev/null @@ -1,27 +0,0 @@ -using UnityEngine;
-
-namespace BehaviorDesigner.Runtime.Tasks.Basic.Math
-{
- [TaskCategory("Basic/Math")]
- [TaskDescription("Clamps the float between two values.")]
- public class FloatClamp : Action
- {
- [Tooltip("The float to clamp")]
- public SharedFloat floatVariable;
- [Tooltip("The maximum value of the float")]
- public SharedFloat minValue;
- [Tooltip("The maximum value of the float")]
- public SharedFloat maxValue;
-
- public override TaskStatus OnUpdate()
- {
- floatVariable.Value = Mathf.Clamp(floatVariable.Value, minValue.Value, maxValue.Value);
- return TaskStatus.Success;
- }
-
- public override void OnReset()
- {
- floatVariable = minValue = maxValue = 0;
- }
- }
-}
\ No newline at end of file |