From 97da432c35b8c7aaf9dd2c39e2aa4b1f55f36065 Mon Sep 17 00:00:00 2001 From: chai Date: Wed, 27 Jan 2021 16:15:06 +0800 Subject: +behaviour designer --- .../Runtime/Basic Tasks/Vector3/SetValue.cs | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 Client/Assets/Behavior Designer/Runtime/Basic Tasks/Vector3/SetValue.cs (limited to 'Client/Assets/Behavior Designer/Runtime/Basic Tasks/Vector3/SetValue.cs') 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 -- cgit v1.1-26-g67d0