diff options
author | chai <chaifix@163.com> | 2022-03-10 14:07:40 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2022-03-10 14:07:40 +0800 |
commit | 22891bf59032ba88262824255a706d652031384b (patch) | |
tree | 7595439ba9966c9402d37e37cee5e8cf098757d5 /Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Debug | |
parent | 8b04ea73e540067f83870b61d89db4868fea5e8a (diff) |
* move folder
Diffstat (limited to 'Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Debug')
8 files changed, 0 insertions, 198 deletions
diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Debug/DrawLine.cs b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Debug/DrawLine.cs deleted file mode 100644 index c4bc3464..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Debug/DrawLine.cs +++ /dev/null @@ -1,36 +0,0 @@ -using UnityEngine;
-
-namespace BehaviorDesigner.Runtime.Tasks.Basic.UnityDebug
-{
- [TaskCategory("Basic/Debug")]
- [TaskDescription("Draws a debug line")]
- public class DrawLine : Action
- {
- [Tooltip("The start position")]
- public SharedVector3 start;
- [Tooltip("The end position")]
- public SharedVector3 end;
- [Tooltip("The color")]
- public SharedColor color = Color.white;
- [Tooltip("Duration the line will be visible for in seconds.\nDefault: 0 means 1 frame.")]
- public SharedFloat duration;
- [Tooltip("Whether the line should show through world geometry.")]
- public SharedBool depthTest = true;
-
- public override TaskStatus OnUpdate()
- {
- Debug.DrawLine(start.Value, end.Value, color.Value, duration.Value, depthTest.Value);
-
- return TaskStatus.Success;
- }
-
- public override void OnReset()
- {
- start = Vector3.zero;
- end = Vector3.zero;
- color = Color.white;
- duration = 0f;
- depthTest = true;
- }
- }
-}
\ No newline at end of file diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Debug/DrawLine.cs.meta b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Debug/DrawLine.cs.meta deleted file mode 100644 index 224373d4..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Debug/DrawLine.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2
-guid: 66a533f4f027ab44bb35e498d761ce50
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Debug/DrawRay.cs b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Debug/DrawRay.cs deleted file mode 100644 index 81aa823f..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Debug/DrawRay.cs +++ /dev/null @@ -1,30 +0,0 @@ -using UnityEngine;
-
-namespace BehaviorDesigner.Runtime.Tasks.Basic.UnityDebug
-{
- [TaskCategory("Basic/Debug")]
- [TaskDescription("Draws a debug ray")]
- public class DrawRay : Action
- {
- [Tooltip("The position")]
- public SharedVector3 start;
- [Tooltip("The direction")]
- public SharedVector3 direction;
- [Tooltip("The color")]
- public SharedColor color = Color.white;
-
- public override TaskStatus OnUpdate()
- {
- Debug.DrawRay(start.Value, direction.Value, color.Value);
-
- return TaskStatus.Success;
- }
-
- public override void OnReset()
- {
- start = Vector3.zero;
- direction = Vector3.zero;
- color = Color.white;
- }
- }
-}
\ No newline at end of file diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Debug/DrawRay.cs.meta b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Debug/DrawRay.cs.meta deleted file mode 100644 index 8490bb34..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Debug/DrawRay.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2
-guid: 786ac0c09ce982e43b444670fdfe4c74
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Debug/LogFormat.cs b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Debug/LogFormat.cs deleted file mode 100644 index 00f96bba..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Debug/LogFormat.cs +++ /dev/null @@ -1,76 +0,0 @@ -using UnityEngine;
-
-namespace BehaviorDesigner.Runtime.Tasks.Basic.UnityDebug
-{
- [TaskDescription("LogFormat is analgous to Debug.LogFormat().\n" +
- "It takes format string, substitutes arguments supplied a '{0-4}' and returns success.\n" +
- "Any fields or arguments not supplied are ignored." +
- "It can be used for debugging.")]
- [TaskIcon("{SkinColor}LogIcon.png")]
- public class LogFormat : Action
- {
- [Tooltip("Text format with {0}, {1}, etc")]
- public SharedString textFormat;
-
- [Tooltip("Is this text an error?")]
- public SharedBool logError;
-
- public SharedVariable arg0;
- public SharedVariable arg1;
- public SharedVariable arg2;
- public SharedVariable arg3;
-
- public override TaskStatus OnUpdate()
- {
- var paramsArray = buildParamsArray();
- // Log the text and return success
- if (logError.Value) {
- Debug.LogErrorFormat(textFormat.Value, paramsArray);
- } else {
- Debug.LogFormat(textFormat.Value, paramsArray);
- }
- return TaskStatus.Success;
- }
-
- private object[] buildParamsArray() {
- object[] paramsArray;
- if (isValid(arg3)) {
- paramsArray = new object[4];
- paramsArray[3] = arg3.GetValue();
- paramsArray[2] = arg2.GetValue();
- paramsArray[1] = arg1.GetValue();
- paramsArray[0] = arg0.GetValue();
- } else if (isValid(arg2)) {
- paramsArray = new object[3];
- paramsArray[2] = arg2.GetValue();
- paramsArray[1] = arg1.GetValue();
- paramsArray[0] = arg0.GetValue();
- } else if (isValid(arg1)) {
- paramsArray = new object[2];
- paramsArray[1] = arg1.GetValue();
- paramsArray[0] = arg0.GetValue();
- } else if (isValid(arg0)) {
- paramsArray = new object[1];
- paramsArray[0] = arg0.GetValue();
- } else {
- return null;
- }
- return paramsArray;
- }
-
- private bool isValid(SharedVariable sv) {
- return null != sv && !sv.IsNone;
- }
-
- public override void OnReset()
- {
- // Reset the properties back to their original values
- textFormat = string.Empty;
- logError = false;
- arg0 = null;
- arg1 = null;
- arg2 = null;
- arg3 = null;
- }
- }
-}
\ No newline at end of file diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Debug/LogFormat.cs.meta b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Debug/LogFormat.cs.meta deleted file mode 100644 index 65c27cda..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Debug/LogFormat.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2
-guid: 70765819b419e8a45b326e92edf17ef5
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Debug/LogValue.cs b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Debug/LogValue.cs deleted file mode 100644 index 73605da8..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Debug/LogValue.cs +++ /dev/null @@ -1,24 +0,0 @@ -using UnityEngine;
-
-namespace BehaviorDesigner.Runtime.Tasks.Basic.UnityDebug
-{
- [TaskCategory("Basic/Debug")]
- [TaskDescription("Log a variable value.")]
- public class LogValue : Action
- {
- [Tooltip("The variable to output")]
- public SharedGenericVariable variable;
-
- public override TaskStatus OnUpdate()
- {
- Debug.Log(variable.Value.value.GetValue());
-
- return TaskStatus.Success;
- }
-
- public override void OnReset()
- {
- variable = null;
- }
- }
-}
\ No newline at end of file diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Debug/LogValue.cs.meta b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Debug/LogValue.cs.meta deleted file mode 100644 index 03ab4247..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Debug/LogValue.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2
-guid: c50983a88995f4f4197f7b39ca796667
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
|