summaryrefslogtreecommitdiff
path: root/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/SharedVariables/SetSharedBool.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/SharedVariables/SetSharedBool.cs')
-rw-r--r--Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/SharedVariables/SetSharedBool.cs26
1 files changed, 26 insertions, 0 deletions
diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/SharedVariables/SetSharedBool.cs b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/SharedVariables/SetSharedBool.cs
new file mode 100644
index 00000000..1043c0fa
--- /dev/null
+++ b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/SharedVariables/SetSharedBool.cs
@@ -0,0 +1,26 @@
+namespace BehaviorDesigner.Runtime.Tasks.Basic.SharedVariables
+{
+ [TaskCategory("Basic/SharedVariable")]
+ [TaskDescription("Sets the SharedBool variable to the specified object. Returns Success.")]
+ public class SetSharedBool : Action
+ {
+ [Tooltip("The value to set the SharedBool to")]
+ public SharedBool targetValue;
+ [RequiredField]
+ [Tooltip("The SharedBool to set")]
+ public SharedBool targetVariable;
+
+ public override TaskStatus OnUpdate()
+ {
+ targetVariable.Value = targetValue.Value;
+
+ return TaskStatus.Success;
+ }
+
+ public override void OnReset()
+ {
+ targetValue = false;
+ targetVariable = false;
+ }
+ }
+} \ No newline at end of file