From 22891bf59032ba88262824255a706d652031384b Mon Sep 17 00:00:00 2001 From: chai Date: Thu, 10 Mar 2022 14:07:40 +0800 Subject: * move folder --- .../Runtime/Basic Tasks/String/Format.cs | 47 ---------------------- 1 file changed, 47 deletions(-) delete mode 100644 Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/String/Format.cs (limited to 'Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/String/Format.cs') diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/String/Format.cs b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/String/Format.cs deleted file mode 100644 index 96e57f85..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/String/Format.cs +++ /dev/null @@ -1,47 +0,0 @@ -using UnityEngine; -using System; - -namespace BehaviorDesigner.Runtime.Tasks.Basic.UnityString -{ - [TaskCategory("Basic/String")] - [TaskDescription("Stores a string with the specified format.")] - public class Format : Action - { - [Tooltip("The format of the string")] - public SharedString format; - [Tooltip("Any variables to appear in the string")] - public SharedGenericVariable[] variables; - [Tooltip("The result of the format")] - [RequiredField] - public SharedString storeResult; - - private object[] variableValues; - - public override void OnAwake() - { - variableValues = new object[variables.Length]; - } - - public override TaskStatus OnUpdate() - { - for (int i = 0; i < variableValues.Length; ++i) { - variableValues[i] = variables[i].Value.value.GetValue(); - } - - try { - storeResult.Value = string.Format(format.Value, variableValues); - } catch (Exception e) { - Debug.LogError(e.Message); - return TaskStatus.Failure; - } - return TaskStatus.Success; - } - - public override void OnReset() - { - format = ""; - variables = null; - storeResult = null; - } - } -} \ No newline at end of file -- cgit v1.1-26-g67d0