diff options
Diffstat (limited to 'Client/Assets/Behavior Designer/Runtime/Basic Tasks/SharedVariables/SetSharedFloat.cs')
-rw-r--r-- | Client/Assets/Behavior Designer/Runtime/Basic Tasks/SharedVariables/SetSharedFloat.cs | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/Client/Assets/Behavior Designer/Runtime/Basic Tasks/SharedVariables/SetSharedFloat.cs b/Client/Assets/Behavior Designer/Runtime/Basic Tasks/SharedVariables/SetSharedFloat.cs new file mode 100644 index 00000000..49ed89a4 --- /dev/null +++ b/Client/Assets/Behavior Designer/Runtime/Basic Tasks/SharedVariables/SetSharedFloat.cs @@ -0,0 +1,28 @@ +using UnityEngine;
+
+namespace BehaviorDesigner.Runtime.Tasks.Basic.SharedVariables
+{
+ [TaskCategory("Basic/SharedVariable")]
+ [TaskDescription("Sets the SharedFloat variable to the specified object. Returns Success.")]
+ public class SetSharedFloat : Action
+ {
+ [Tooltip("The value to set the SharedFloat to")]
+ public SharedFloat targetValue;
+ [RequiredField]
+ [Tooltip("The SharedFloat to set")]
+ public SharedFloat targetVariable;
+
+ public override TaskStatus OnUpdate()
+ {
+ targetVariable.Value = targetValue.Value;
+
+ return TaskStatus.Success;
+ }
+
+ public override void OnReset()
+ {
+ targetValue = 0;
+ targetVariable = 0;
+ }
+ }
+}
\ No newline at end of file |