summaryrefslogtreecommitdiff
path: root/Client/Assets/Behavior Designer/Runtime/Basic Tasks/Vector3/SetValue.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Client/Assets/Behavior Designer/Runtime/Basic Tasks/Vector3/SetValue.cs')
-rw-r--r--Client/Assets/Behavior Designer/Runtime/Basic Tasks/Vector3/SetValue.cs25
1 files changed, 25 insertions, 0 deletions
diff --git a/Client/Assets/Behavior Designer/Runtime/Basic Tasks/Vector3/SetValue.cs b/Client/Assets/Behavior Designer/Runtime/Basic Tasks/Vector3/SetValue.cs
new file mode 100644
index 00000000..20034af0
--- /dev/null
+++ b/Client/Assets/Behavior Designer/Runtime/Basic Tasks/Vector3/SetValue.cs
@@ -0,0 +1,25 @@
+using UnityEngine;
+
+namespace BehaviorDesigner.Runtime.Tasks.Basic.UnityVector3
+{
+ [TaskCategory("Basic/Vector3")]
+ [TaskDescription("Sets the value of the Vector3.")]
+ public class SetValue : Action
+ {
+ [Tooltip("The Vector3 to get the values of")]
+ public SharedVector3 vector3Value;
+ [Tooltip("The Vector3 to set the values of")]
+ public SharedVector3 vector3Variable;
+
+ public override TaskStatus OnUpdate()
+ {
+ vector3Variable.Value = vector3Value.Value;
+ return TaskStatus.Success;
+ }
+
+ public override void OnReset()
+ {
+ vector3Value = vector3Variable = Vector3.zero;
+ }
+ }
+} \ No newline at end of file