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/Transform | |
parent | 8b04ea73e540067f83870b61d89db4868fea5e8a (diff) |
* move folder
Diffstat (limited to 'Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform')
64 files changed, 0 insertions, 1723 deletions
diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/Find.cs b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/Find.cs deleted file mode 100644 index 8f45f378..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/Find.cs +++ /dev/null @@ -1,48 +0,0 @@ -using UnityEngine;
-
-namespace BehaviorDesigner.Runtime.Tasks.Basic.UnityTransform
-{
- [TaskCategory("Basic/Transform")]
- [TaskDescription("Finds a transform by name. Returns Success.")]
- public class Find : Action
- {
- [Tooltip("The GameObject that the task operates on. If null the task GameObject is used.")]
- public SharedGameObject targetGameObject;
- [Tooltip("The transform name to find")]
- public SharedString transformName;
- [Tooltip("The object found by name")]
- [RequiredField]
- public SharedTransform storeValue;
-
- private Transform targetTransform;
- private GameObject prevGameObject;
-
- public override void OnStart()
- {
- var currentGameObject = GetDefaultGameObject(targetGameObject.Value);
- if (currentGameObject != prevGameObject) {
- targetTransform = currentGameObject.GetComponent<Transform>();
- prevGameObject = currentGameObject;
- }
- }
-
- public override TaskStatus OnUpdate()
- {
- if (targetTransform == null) {
- Debug.LogWarning("Transform is null");
- return TaskStatus.Failure;
- }
-
- storeValue.Value = targetTransform.Find(transformName.Value);
-
- return TaskStatus.Success;
- }
-
- public override void OnReset()
- {
- targetGameObject = null;
- transformName = null;
- storeValue = null;
- }
- }
-}
\ No newline at end of file diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/Find.cs.meta b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/Find.cs.meta deleted file mode 100644 index b0220ca3..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/Find.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2
-guid: 387fd22087393ab4e91f0ad4fce4e77f
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/FindChild.cs b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/FindChild.cs deleted file mode 100644 index a6c31655..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/FindChild.cs +++ /dev/null @@ -1,48 +0,0 @@ -using UnityEngine;
-
-namespace BehaviorDesigner.Runtime.Tasks.Basic.UnityTransform
-{
- [TaskCategory("Basic/Transform")]
- [TaskDescription("Finds a child transform by name. Returns Success.")]
- public class FindChild : Action
- {
- [Tooltip("The GameObject that the task operates on. If null the task GameObject is used.")]
- public SharedGameObject targetGameObject;
- [Tooltip("The transform name to find")]
- public SharedString transformName;
- [Tooltip("The object found by name")]
- [RequiredField]
- public SharedTransform storeValue;
-
- private Transform targetTransform;
- private GameObject prevGameObject;
-
- public override void OnStart()
- {
- var currentGameObject = GetDefaultGameObject(targetGameObject.Value);
- if (currentGameObject != prevGameObject) {
- targetTransform = currentGameObject.GetComponent<Transform>();
- prevGameObject = currentGameObject;
- }
- }
-
- public override TaskStatus OnUpdate()
- {
- if (targetTransform == null) {
- Debug.LogWarning("Transform is null");
- return TaskStatus.Failure;
- }
-
- storeValue.Value = targetTransform.Find(transformName.Value);
-
- return TaskStatus.Success;
- }
-
- public override void OnReset()
- {
- targetGameObject = null;
- transformName = null;
- storeValue = null;
- }
- }
-}
\ No newline at end of file diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/FindChild.cs.meta b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/FindChild.cs.meta deleted file mode 100644 index 7f6d7a53..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/FindChild.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2
-guid: 62d28af7da95a12409245b2682550bcc
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/GetAngleToTarget.cs b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/GetAngleToTarget.cs deleted file mode 100644 index cee67ccb..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/GetAngleToTarget.cs +++ /dev/null @@ -1,66 +0,0 @@ -using UnityEngine;
-
-namespace BehaviorDesigner.Runtime.Tasks.Basic.UnityTransform
-{
- [TaskCategory("Basic/Transform")]
- [TaskDescription("Gets the Angle between a GameObject's forward direction and a target. Returns Success.")]
- public class GetAngleToTarget : Action
- {
- [Tooltip("The GameObject that the task operates on. If null the task GameObject is used.")]
- public SharedGameObject targetGameObject;
- [Tooltip("The target object to measure the angle to. If null the targetPosition will be used.")]
- public SharedGameObject targetObject;
- [Tooltip("The world position to measure an angle to. If the targetObject is also not null, this value is used as an offset from that object's position.")]
- public SharedVector3 targetPosition;
- [Tooltip("Ignore height differences when calculating the angle?")]
- public SharedBool ignoreHeight = true;
- [Tooltip("The angle to the target")]
- [RequiredField]
- public SharedFloat storeValue;
-
- private Transform targetTransform;
- private GameObject prevGameObject;
-
- public override void OnStart()
- {
- var currentGameObject = GetDefaultGameObject(targetGameObject.Value);
- if (currentGameObject != prevGameObject) {
- targetTransform = currentGameObject.GetComponent<Transform>();
- prevGameObject = currentGameObject;
- }
- }
-
- public override TaskStatus OnUpdate()
- {
- if (targetTransform == null) {
- Debug.LogWarning("Transform is null");
- return TaskStatus.Failure;
- }
-
- Vector3 targetPos;
- if (targetObject.Value != null) {
- targetPos = targetObject.Value.transform.InverseTransformPoint(targetPosition.Value);
- } else {
- targetPos = targetPosition.Value;
- }
-
- if (ignoreHeight.Value) {
- targetPos.y = targetTransform.position.y;
- }
-
- var targetDir = targetPos - targetTransform.position;
- storeValue.Value = Vector3.Angle(targetDir, targetTransform.forward);
-
- return TaskStatus.Success;
- }
-
- public override void OnReset()
- {
- targetGameObject = null;
- targetObject = null;
- targetPosition = Vector3.zero;
- ignoreHeight = true;
- storeValue = 0;
- }
- }
-}
\ No newline at end of file diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/GetAngleToTarget.cs.meta b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/GetAngleToTarget.cs.meta deleted file mode 100644 index d34a2704..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/GetAngleToTarget.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2
-guid: ae176a605fff9a2468198085313c26ad
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/GetChild.cs b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/GetChild.cs deleted file mode 100644 index 337e2341..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/GetChild.cs +++ /dev/null @@ -1,48 +0,0 @@ -using UnityEngine;
-
-namespace BehaviorDesigner.Runtime.Tasks.Basic.UnityTransform
-{
- [TaskCategory("Basic/Transform")]
- [TaskDescription("Stores the transform child at the specified index. Returns Success.")]
- public class GetChild : Action
- {
- [Tooltip("The GameObject that the task operates on. If null the task GameObject is used.")]
- public SharedGameObject targetGameObject;
- [Tooltip("The index of the child")]
- public SharedInt index;
- [Tooltip("The child of the Transform")]
- [RequiredField]
- public SharedTransform storeValue;
-
- private Transform targetTransform;
- private GameObject prevGameObject;
-
- public override void OnStart()
- {
- var currentGameObject = GetDefaultGameObject(targetGameObject.Value);
- if (currentGameObject != prevGameObject) {
- targetTransform = currentGameObject.GetComponent<Transform>();
- prevGameObject = currentGameObject;
- }
- }
-
- public override TaskStatus OnUpdate()
- {
- if (targetTransform == null) {
- Debug.LogWarning("Transform is null");
- return TaskStatus.Failure;
- }
-
- storeValue.Value = targetTransform.GetChild(index.Value);
-
- return TaskStatus.Success;
- }
-
- public override void OnReset()
- {
- targetGameObject = null;
- index = 0;
- storeValue = null;
- }
- }
-}
\ No newline at end of file diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/GetChild.cs.meta b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/GetChild.cs.meta deleted file mode 100644 index a90dba3a..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/GetChild.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2
-guid: 04ea225bb12181a4daf7f3d6a21eaa5d
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/GetChildCount.cs b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/GetChildCount.cs deleted file mode 100644 index aca95e80..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/GetChildCount.cs +++ /dev/null @@ -1,45 +0,0 @@ -using UnityEngine;
-
-namespace BehaviorDesigner.Runtime.Tasks.Basic.UnityTransform
-{
- [TaskCategory("Basic/Transform")]
- [TaskDescription("Stores the number of children a Transform has. Returns Success.")]
- public class GetChildCount : Action
- {
- [Tooltip("The GameObject that the task operates on. If null the task GameObject is used.")]
- public SharedGameObject targetGameObject;
- [Tooltip("The number of children")]
- [RequiredField]
- public SharedInt storeValue;
-
- private Transform targetTransform;
- private GameObject prevGameObject;
-
- public override void OnStart()
- {
- var currentGameObject = GetDefaultGameObject(targetGameObject.Value);
- if (currentGameObject != prevGameObject) {
- targetTransform = currentGameObject.GetComponent<Transform>();
- prevGameObject = currentGameObject;
- }
- }
-
- public override TaskStatus OnUpdate()
- {
- if (targetTransform == null) {
- Debug.LogWarning("Transform is null");
- return TaskStatus.Failure;
- }
-
- storeValue.Value = targetTransform.childCount;
-
- return TaskStatus.Success;
- }
-
- public override void OnReset()
- {
- targetGameObject = null;
- storeValue = 0;
- }
- }
-}
\ No newline at end of file diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/GetChildCount.cs.meta b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/GetChildCount.cs.meta deleted file mode 100644 index 0ff26358..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/GetChildCount.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2
-guid: 8e31c13112e4d334ab9d67feaac94d3f
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/GetEulerAngles.cs b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/GetEulerAngles.cs deleted file mode 100644 index a7764a8b..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/GetEulerAngles.cs +++ /dev/null @@ -1,45 +0,0 @@ -using UnityEngine;
-
-namespace BehaviorDesigner.Runtime.Tasks.Basic.UnityTransform
-{
- [TaskCategory("Basic/Transform")]
- [TaskDescription("Stores the euler angles of the Transform. Returns Success.")]
- public class GetEulerAngles : Action
- {
- [Tooltip("The GameObject that the task operates on. If null the task GameObject is used.")]
- public SharedGameObject targetGameObject;
- [Tooltip("The euler angles of the Transform")]
- [RequiredField]
- public SharedVector3 storeValue;
-
- private Transform targetTransform;
- private GameObject prevGameObject;
-
- public override void OnStart()
- {
- var currentGameObject = GetDefaultGameObject(targetGameObject.Value);
- if (currentGameObject != prevGameObject) {
- targetTransform = currentGameObject.GetComponent<Transform>();
- prevGameObject = currentGameObject;
- }
- }
-
- public override TaskStatus OnUpdate()
- {
- if (targetTransform == null) {
- Debug.LogWarning("Transform is null");
- return TaskStatus.Failure;
- }
-
- storeValue.Value = targetTransform.eulerAngles;
-
- return TaskStatus.Success;
- }
-
- public override void OnReset()
- {
- targetGameObject = null;
- storeValue = Vector3.zero;
- }
- }
-}
\ No newline at end of file diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/GetEulerAngles.cs.meta b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/GetEulerAngles.cs.meta deleted file mode 100644 index 0118e3b4..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/GetEulerAngles.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2
-guid: 43295a23f5d9cb345ae408d5ac843b52
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/GetForwardVector.cs b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/GetForwardVector.cs deleted file mode 100644 index 0420db5b..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/GetForwardVector.cs +++ /dev/null @@ -1,45 +0,0 @@ -using UnityEngine;
-
-namespace BehaviorDesigner.Runtime.Tasks.Basic.UnityTransform
-{
- [TaskCategory("Basic/Transform")]
- [TaskDescription("Stores the forward vector of the Transform. Returns Success.")]
- public class GetForwardVector : Action
- {
- [Tooltip("The GameObject that the task operates on. If null the task GameObject is used.")]
- public SharedGameObject targetGameObject;
- [Tooltip("The position of the Transform")]
- [RequiredField]
- public SharedVector3 storeValue;
-
- private Transform targetTransform;
- private GameObject prevGameObject;
-
- public override void OnStart()
- {
- var currentGameObject = GetDefaultGameObject(targetGameObject.Value);
- if (currentGameObject != prevGameObject) {
- targetTransform = currentGameObject.GetComponent<Transform>();
- prevGameObject = currentGameObject;
- }
- }
-
- public override TaskStatus OnUpdate()
- {
- if (targetTransform == null) {
- Debug.LogWarning("Transform is null");
- return TaskStatus.Failure;
- }
-
- storeValue.Value = targetTransform.forward;
-
- return TaskStatus.Success;
- }
-
- public override void OnReset()
- {
- targetGameObject = null;
- storeValue = Vector3.zero;
- }
- }
-}
\ No newline at end of file diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/GetForwardVector.cs.meta b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/GetForwardVector.cs.meta deleted file mode 100644 index 6bda0d73..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/GetForwardVector.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2
-guid: a5748c07a5ebe54429eb3e9ae032b5e2
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/GetLocalEulerAngles.cs b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/GetLocalEulerAngles.cs deleted file mode 100644 index fee24dde..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/GetLocalEulerAngles.cs +++ /dev/null @@ -1,45 +0,0 @@ -using UnityEngine;
-
-namespace BehaviorDesigner.Runtime.Tasks.Basic.UnityTransform
-{
- [TaskCategory("Basic/Transform")]
- [TaskDescription("Stores the local euler angles of the Transform. Returns Success.")]
- public class GetLocalEulerAngles : Action
- {
- [Tooltip("The GameObject that the task operates on. If null the task GameObject is used.")]
- public SharedGameObject targetGameObject;
- [Tooltip("The local euler angles of the Transform")]
- [RequiredField]
- public SharedVector3 storeValue;
-
- private Transform targetTransform;
- private GameObject prevGameObject;
-
- public override void OnStart()
- {
- var currentGameObject = GetDefaultGameObject(targetGameObject.Value);
- if (currentGameObject != prevGameObject) {
- targetTransform = currentGameObject.GetComponent<Transform>();
- prevGameObject = currentGameObject;
- }
- }
-
- public override TaskStatus OnUpdate()
- {
- if (targetTransform == null) {
- Debug.LogWarning("Transform is null");
- return TaskStatus.Failure;
- }
-
- storeValue.Value = targetTransform.localEulerAngles;
-
- return TaskStatus.Success;
- }
-
- public override void OnReset()
- {
- targetGameObject = null;
- storeValue = Vector3.zero;
- }
- }
-}
\ No newline at end of file diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/GetLocalEulerAngles.cs.meta b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/GetLocalEulerAngles.cs.meta deleted file mode 100644 index 40c781a6..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/GetLocalEulerAngles.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2
-guid: 459c793e1b836104f901813471414ccc
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/GetLocalPosition.cs b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/GetLocalPosition.cs deleted file mode 100644 index 56737de6..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/GetLocalPosition.cs +++ /dev/null @@ -1,45 +0,0 @@ -using UnityEngine;
-
-namespace BehaviorDesigner.Runtime.Tasks.Basic.UnityTransform
-{
- [TaskCategory("Basic/Transform")]
- [TaskDescription("Stores the local position of the Transform. Returns Success.")]
- public class GetLocalPosition : Action
- {
- [Tooltip("The GameObject that the task operates on. If null the task GameObject is used.")]
- public SharedGameObject targetGameObject;
- [Tooltip("The local position of the Transform")]
- [RequiredField]
- public SharedVector3 storeValue;
-
- private Transform targetTransform;
- private GameObject prevGameObject;
-
- public override void OnStart()
- {
- var currentGameObject = GetDefaultGameObject(targetGameObject.Value);
- if (currentGameObject != prevGameObject) {
- targetTransform = currentGameObject.GetComponent<Transform>();
- prevGameObject = currentGameObject;
- }
- }
-
- public override TaskStatus OnUpdate()
- {
- if (targetTransform == null) {
- Debug.LogWarning("Transform is null");
- return TaskStatus.Failure;
- }
-
- storeValue.Value = targetTransform.localPosition;
-
- return TaskStatus.Success;
- }
-
- public override void OnReset()
- {
- targetGameObject = null;
- storeValue = Vector3.zero;
- }
- }
-}
\ No newline at end of file diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/GetLocalPosition.cs.meta b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/GetLocalPosition.cs.meta deleted file mode 100644 index 57d121c8..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/GetLocalPosition.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2
-guid: 4fdc0d751b2c91f438142cf65fcbba34
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/GetLocalRotation.cs b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/GetLocalRotation.cs deleted file mode 100644 index e2572ab1..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/GetLocalRotation.cs +++ /dev/null @@ -1,45 +0,0 @@ -using UnityEngine;
-
-namespace BehaviorDesigner.Runtime.Tasks.Basic.UnityTransform
-{
- [TaskCategory("Basic/Transform")]
- [TaskDescription("Stores the local rotation of the Transform. Returns Success.")]
- public class GetLocalRotation : Action
- {
- [Tooltip("The GameObject that the task operates on. If null the task GameObject is used.")]
- public SharedGameObject targetGameObject;
- [Tooltip("The local rotation of the Transform")]
- [RequiredField]
- public SharedQuaternion storeValue;
-
- private Transform targetTransform;
- private GameObject prevGameObject;
-
- public override void OnStart()
- {
- var currentGameObject = GetDefaultGameObject(targetGameObject.Value);
- if (currentGameObject != prevGameObject) {
- targetTransform = currentGameObject.GetComponent<Transform>();
- prevGameObject = currentGameObject;
- }
- }
-
- public override TaskStatus OnUpdate()
- {
- if (targetTransform == null) {
- Debug.LogWarning("Transform is null");
- return TaskStatus.Failure;
- }
-
- storeValue.Value = targetTransform.localRotation;
-
- return TaskStatus.Success;
- }
-
- public override void OnReset()
- {
- targetGameObject = null;
- storeValue = Quaternion.identity;
- }
- }
-}
\ No newline at end of file diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/GetLocalRotation.cs.meta b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/GetLocalRotation.cs.meta deleted file mode 100644 index 6cc867c3..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/GetLocalRotation.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2
-guid: 2334ddf0e58b67e40ad16e2f63dad8ee
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/GetLocalScale.cs b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/GetLocalScale.cs deleted file mode 100644 index bfdc2831..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/GetLocalScale.cs +++ /dev/null @@ -1,45 +0,0 @@ -using UnityEngine;
-
-namespace BehaviorDesigner.Runtime.Tasks.Basic.UnityTransform
-{
- [TaskCategory("Basic/Transform")]
- [TaskDescription("Stores the local scale of the Transform. Returns Success.")]
- public class GetLocalScale : Action
- {
- [Tooltip("The GameObject that the task operates on. If null the task GameObject is used.")]
- public SharedGameObject targetGameObject;
- [Tooltip("The local scale of the Transform")]
- [RequiredField]
- public SharedVector3 storeValue;
-
- private Transform targetTransform;
- private GameObject prevGameObject;
-
- public override void OnStart()
- {
- var currentGameObject = GetDefaultGameObject(targetGameObject.Value);
- if (currentGameObject != prevGameObject) {
- targetTransform = currentGameObject.GetComponent<Transform>();
- prevGameObject = currentGameObject;
- }
- }
-
- public override TaskStatus OnUpdate()
- {
- if (targetTransform == null) {
- Debug.LogWarning("Transform is null");
- return TaskStatus.Failure;
- }
-
- storeValue.Value = targetTransform.localScale;
-
- return TaskStatus.Success;
- }
-
- public override void OnReset()
- {
- targetGameObject = null;
- storeValue = Vector3.zero;
- }
- }
-}
\ No newline at end of file diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/GetLocalScale.cs.meta b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/GetLocalScale.cs.meta deleted file mode 100644 index 115bef16..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/GetLocalScale.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2
-guid: e0b10fe3fcda1914fbbdde4a860cd403
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/GetParent.cs b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/GetParent.cs deleted file mode 100644 index 53f2ee1e..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/GetParent.cs +++ /dev/null @@ -1,45 +0,0 @@ -using UnityEngine;
-
-namespace BehaviorDesigner.Runtime.Tasks.Basic.UnityTransform
-{
- [TaskCategory("Basic/Transform")]
- [TaskDescription("Stores the parent of the Transform. Returns Success.")]
- public class GetParent : Action
- {
- [Tooltip("The GameObject that the task operates on. If null the task GameObject is used.")]
- public SharedGameObject targetGameObject;
- [Tooltip("The parent of the Transform")]
- [RequiredField]
- public SharedTransform storeValue;
-
- private Transform targetTransform;
- private GameObject prevGameObject;
-
- public override void OnStart()
- {
- var currentGameObject = GetDefaultGameObject(targetGameObject.Value);
- if (currentGameObject != prevGameObject) {
- targetTransform = currentGameObject.GetComponent<Transform>();
- prevGameObject = currentGameObject;
- }
- }
-
- public override TaskStatus OnUpdate()
- {
- if (targetTransform == null) {
- Debug.LogWarning("Transform is null");
- return TaskStatus.Failure;
- }
-
- storeValue.Value = targetTransform.parent;
-
- return TaskStatus.Success;
- }
-
- public override void OnReset()
- {
- targetGameObject = null;
- storeValue = null;
- }
- }
-}
\ No newline at end of file diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/GetParent.cs.meta b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/GetParent.cs.meta deleted file mode 100644 index 2dffa644..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/GetParent.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2
-guid: f149245d8fce789498c301657a7eaf88
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/GetPosition.cs b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/GetPosition.cs deleted file mode 100644 index 4a6b9cf1..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/GetPosition.cs +++ /dev/null @@ -1,45 +0,0 @@ -using UnityEngine;
-
-namespace BehaviorDesigner.Runtime.Tasks.Basic.UnityTransform
-{
- [TaskCategory("Basic/Transform")]
- [TaskDescription("Stores the position of the Transform. Returns Success.")]
- public class GetPosition : Action
- {
- [Tooltip("The GameObject that the task operates on. If null the task GameObject is used.")]
- public SharedGameObject targetGameObject;
- [Tooltip("Can the target GameObject be empty?")]
- [RequiredField]
- public SharedVector3 storeValue;
-
- private Transform targetTransform;
- private GameObject prevGameObject;
-
- public override void OnStart()
- {
- var currentGameObject = GetDefaultGameObject(targetGameObject.Value);
- if (currentGameObject != prevGameObject) {
- targetTransform = currentGameObject.GetComponent<Transform>();
- prevGameObject = currentGameObject;
- }
- }
-
- public override TaskStatus OnUpdate()
- {
- if (targetTransform == null) {
- Debug.LogWarning("Transform is null");
- return TaskStatus.Failure;
- }
-
- storeValue.Value = targetTransform.position;
-
- return TaskStatus.Success;
- }
-
- public override void OnReset()
- {
- targetGameObject = null;
- storeValue = Vector3.zero;
- }
- }
-}
\ No newline at end of file diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/GetPosition.cs.meta b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/GetPosition.cs.meta deleted file mode 100644 index 207a32c8..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/GetPosition.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2
-guid: 9ce1fdc3f652b3043b5116efba12cc48
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/GetRightVector.cs b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/GetRightVector.cs deleted file mode 100644 index 370d14a9..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/GetRightVector.cs +++ /dev/null @@ -1,45 +0,0 @@ -using UnityEngine;
-
-namespace BehaviorDesigner.Runtime.Tasks.Basic.UnityTransform
-{
- [TaskCategory("Basic/Transform")]
- [TaskDescription("Stores the right vector of the Transform. Returns Success.")]
- public class GetRightVector : Action
- {
- [Tooltip("The GameObject that the task operates on. If null the task GameObject is used.")]
- public SharedGameObject targetGameObject;
- [Tooltip("The position of the Transform")]
- [RequiredField]
- public SharedVector3 storeValue;
-
- private Transform targetTransform;
- private GameObject prevGameObject;
-
- public override void OnStart()
- {
- var currentGameObject = GetDefaultGameObject(targetGameObject.Value);
- if (currentGameObject != prevGameObject) {
- targetTransform = currentGameObject.GetComponent<Transform>();
- prevGameObject = currentGameObject;
- }
- }
-
- public override TaskStatus OnUpdate()
- {
- if (targetTransform == null) {
- Debug.LogWarning("Transform is null");
- return TaskStatus.Failure;
- }
-
- storeValue.Value = targetTransform.right;
-
- return TaskStatus.Success;
- }
-
- public override void OnReset()
- {
- targetGameObject = null;
- storeValue = Vector3.zero;
- }
- }
-}
\ No newline at end of file diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/GetRightVector.cs.meta b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/GetRightVector.cs.meta deleted file mode 100644 index 202902a1..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/GetRightVector.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2
-guid: 6b5147164f2674547888db24cba68770
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/GetRotation.cs b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/GetRotation.cs deleted file mode 100644 index d8a16aec..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/GetRotation.cs +++ /dev/null @@ -1,45 +0,0 @@ -using UnityEngine;
-
-namespace BehaviorDesigner.Runtime.Tasks.Basic.UnityTransform
-{
- [TaskCategory("Basic/Transform")]
- [TaskDescription("Stores the rotation of the Transform. Returns Success.")]
- public class GetRotation : Action
- {
- [Tooltip("The GameObject that the task operates on. If null the task GameObject is used.")]
- public SharedGameObject targetGameObject;
- [Tooltip("The rotation of the Transform")]
- [RequiredField]
- public SharedQuaternion storeValue;
-
- private Transform targetTransform;
- private GameObject prevGameObject;
-
- public override void OnStart()
- {
- var currentGameObject = GetDefaultGameObject(targetGameObject.Value);
- if (currentGameObject != prevGameObject) {
- targetTransform = currentGameObject.GetComponent<Transform>();
- prevGameObject = currentGameObject;
- }
- }
-
- public override TaskStatus OnUpdate()
- {
- if (targetTransform == null) {
- Debug.LogWarning("Transform is null");
- return TaskStatus.Failure;
- }
-
- storeValue.Value = targetTransform.rotation;
-
- return TaskStatus.Success;
- }
-
- public override void OnReset()
- {
- targetGameObject = null;
- storeValue = Quaternion.identity;
- }
- }
-}
\ No newline at end of file diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/GetRotation.cs.meta b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/GetRotation.cs.meta deleted file mode 100644 index ca52e97b..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/GetRotation.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2
-guid: 5384b69809f40f5489ca7d7d345471d2
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/GetUpVector.cs b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/GetUpVector.cs deleted file mode 100644 index e557b713..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/GetUpVector.cs +++ /dev/null @@ -1,45 +0,0 @@ -using UnityEngine;
-
-namespace BehaviorDesigner.Runtime.Tasks.Basic.UnityTransform
-{
- [TaskCategory("Basic/Transform")]
- [TaskDescription("Stores the up vector of the Transform. Returns Success.")]
- public class GetUpVector : Action
- {
- [Tooltip("The GameObject that the task operates on. If null the task GameObject is used.")]
- public SharedGameObject targetGameObject;
- [Tooltip("The position of the Transform")]
- [RequiredField]
- public SharedVector3 storeValue;
-
- private Transform targetTransform;
- private GameObject prevGameObject;
-
- public override void OnStart()
- {
- var currentGameObject = GetDefaultGameObject(targetGameObject.Value);
- if (currentGameObject != prevGameObject) {
- targetTransform = currentGameObject.GetComponent<Transform>();
- prevGameObject = currentGameObject;
- }
- }
-
- public override TaskStatus OnUpdate()
- {
- if (targetTransform == null) {
- Debug.LogWarning("Transform is null");
- return TaskStatus.Failure;
- }
-
- storeValue.Value = targetTransform.up;
-
- return TaskStatus.Success;
- }
-
- public override void OnReset()
- {
- targetGameObject = null;
- storeValue = Vector3.zero;
- }
- }
-}
\ No newline at end of file diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/GetUpVector.cs.meta b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/GetUpVector.cs.meta deleted file mode 100644 index 0e6f55a2..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/GetUpVector.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2
-guid: 605a7c93705031042be47bd4a4ab6079
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/IsChildOf.cs b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/IsChildOf.cs deleted file mode 100644 index 4e4886b4..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/IsChildOf.cs +++ /dev/null @@ -1,42 +0,0 @@ -using UnityEngine;
-
-namespace BehaviorDesigner.Runtime.Tasks.Basic.UnityTransform
-{
- [TaskCategory("Basic/Transform")]
- [TaskDescription("Returns Success if the transform is a child of the specified GameObject.")]
- public class IsChildOf : Conditional
- {
- [Tooltip("The GameObject that the task operates on. If null the task GameObject is used.")]
- public SharedGameObject targetGameObject;
- [Tooltip("The interested transform")]
- public SharedTransform transformName;
-
- private Transform targetTransform;
- private GameObject prevGameObject;
-
- public override void OnStart()
- {
- var currentGameObject = GetDefaultGameObject(targetGameObject.Value);
- if (currentGameObject != prevGameObject) {
- targetTransform = currentGameObject.GetComponent<Transform>();
- prevGameObject = currentGameObject;
- }
- }
-
- public override TaskStatus OnUpdate()
- {
- if (targetTransform == null) {
- Debug.LogWarning("Transform is null");
- return TaskStatus.Failure;
- }
-
- return targetTransform.IsChildOf(transformName.Value) ? TaskStatus.Success : TaskStatus.Failure;
- }
-
- public override void OnReset()
- {
- targetGameObject = null;
- transformName = null;
- }
- }
-}
\ No newline at end of file diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/IsChildOf.cs.meta b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/IsChildOf.cs.meta deleted file mode 100644 index 9f93239e..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/IsChildOf.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2
-guid: 304e488eb1caa4f45a8bd903292492ca
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/LookAt.cs b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/LookAt.cs deleted file mode 100644 index bee3c7a9..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/LookAt.cs +++ /dev/null @@ -1,47 +0,0 @@ -using UnityEngine;
-
-namespace BehaviorDesigner.Runtime.Tasks.Basic.UnityTransform
-{
- [TaskCategory("Basic/Transform")]
- [TaskDescription("Rotates the transform so the forward vector points at worldPosition. Returns Success.")]
- public class LookAt : Action
- {
- [Tooltip("The GameObject that the task operates on. If null the task GameObject is used.")]
- public SharedGameObject targetGameObject;
- [Tooltip("Point to look at")]
- public SharedVector3 worldPosition;
- [Tooltip("Vector specifying the upward direction")]
- public Vector3 worldUp;
-
- private Transform targetTransform;
- private GameObject prevGameObject;
-
- public override void OnStart()
- {
- var currentGameObject = GetDefaultGameObject(targetGameObject.Value);
- if (currentGameObject != prevGameObject) {
- targetTransform = currentGameObject.GetComponent<Transform>();
- prevGameObject = currentGameObject;
- }
- }
-
- public override TaskStatus OnUpdate()
- {
- if (targetTransform == null) {
- Debug.LogWarning("Transform is null");
- return TaskStatus.Failure;
- }
-
- targetTransform.LookAt(worldPosition.Value, worldUp);
-
- return TaskStatus.Success;
- }
-
- public override void OnReset()
- {
- targetGameObject = null;
- worldPosition = Vector3.up;
- worldUp = Vector3.up;
- }
- }
-}
\ No newline at end of file diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/LookAt.cs.meta b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/LookAt.cs.meta deleted file mode 100644 index 6e3189ff..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/LookAt.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2
-guid: 64883614392671f438244b3aa5b91c6c
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/Rotate.cs b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/Rotate.cs deleted file mode 100644 index 267fe653..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/Rotate.cs +++ /dev/null @@ -1,47 +0,0 @@ -using UnityEngine;
-
-namespace BehaviorDesigner.Runtime.Tasks.Basic.UnityTransform
-{
- [TaskCategory("Basic/Transform")]
- [TaskDescription("Applies a rotation. Returns Success.")]
- public class Rotate : Action
- {
- [Tooltip("The GameObject that the task operates on. If null the task GameObject is used.")]
- public SharedGameObject targetGameObject;
- [Tooltip("Amount to rotate")]
- public SharedVector3 eulerAngles;
- [Tooltip("Specifies which axis the rotation is relative to")]
- public Space relativeTo = Space.Self;
-
- private Transform targetTransform;
- private GameObject prevGameObject;
-
- public override void OnStart()
- {
- var currentGameObject = GetDefaultGameObject(targetGameObject.Value);
- if (currentGameObject != prevGameObject) {
- targetTransform = currentGameObject.GetComponent<Transform>();
- prevGameObject = currentGameObject;
- }
- }
-
- public override TaskStatus OnUpdate()
- {
- if (targetTransform == null) {
- Debug.LogWarning("Transform is null");
- return TaskStatus.Failure;
- }
-
- targetTransform.Rotate(eulerAngles.Value, relativeTo);
-
- return TaskStatus.Success;
- }
-
- public override void OnReset()
- {
- targetGameObject = null;
- eulerAngles = Vector3.zero;
- relativeTo = Space.Self;
- }
- }
-}
\ No newline at end of file diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/Rotate.cs.meta b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/Rotate.cs.meta deleted file mode 100644 index b4a9c387..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/Rotate.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2
-guid: db0cba6372babb541a0da57412963760
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/RotateAround.cs b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/RotateAround.cs deleted file mode 100644 index ac3feb57..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/RotateAround.cs +++ /dev/null @@ -1,50 +0,0 @@ -using UnityEngine;
-
-namespace BehaviorDesigner.Runtime.Tasks.Basic.UnityTransform
-{
- [TaskCategory("Basic/Transform")]
- [TaskDescription("Applies a rotation. Returns Success.")]
- public class RotateAround : Action
- {
- [Tooltip("The GameObject that the task operates on. If null the task GameObject is used.")]
- public SharedGameObject targetGameObject;
- [Tooltip("Point to rotate around")]
- public SharedVector3 point;
- [Tooltip("Axis to rotate around")]
- public SharedVector3 axis;
- [Tooltip("Amount to rotate")]
- public SharedFloat angle;
-
- private Transform targetTransform;
- private GameObject prevGameObject;
-
- public override void OnStart()
- {
- var currentGameObject = GetDefaultGameObject(targetGameObject.Value);
- if (currentGameObject != prevGameObject) {
- targetTransform = currentGameObject.GetComponent<Transform>();
- prevGameObject = currentGameObject;
- }
- }
-
- public override TaskStatus OnUpdate()
- {
- if (targetTransform == null) {
- Debug.LogWarning("Transform is null");
- return TaskStatus.Failure;
- }
-
- targetTransform.RotateAround(point.Value, axis.Value, angle.Value);
-
- return TaskStatus.Success;
- }
-
- public override void OnReset()
- {
- targetGameObject = null;
- point = Vector3.zero;
- axis = Vector3.zero;
- angle = 0;
- }
- }
-}
\ No newline at end of file diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/RotateAround.cs.meta b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/RotateAround.cs.meta deleted file mode 100644 index 8bd780cc..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/RotateAround.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2
-guid: 65cef920fcc4ec449a1e6a29fe79c024
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/SetEulerAngles.cs b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/SetEulerAngles.cs deleted file mode 100644 index bc509186..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/SetEulerAngles.cs +++ /dev/null @@ -1,44 +0,0 @@ -using UnityEngine;
-
-namespace BehaviorDesigner.Runtime.Tasks.Basic.UnityTransform
-{
- [TaskCategory("Basic/Transform")]
- [TaskDescription("Sets the euler angles of the Transform. Returns Success.")]
- public class SetEulerAngles : Action
- {
- [Tooltip("The GameObject that the task operates on. If null the task GameObject is used.")]
- public SharedGameObject targetGameObject;
- [Tooltip("The euler angles of the Transform")]
- public SharedVector3 eulerAngles;
-
- private Transform targetTransform;
- private GameObject prevGameObject;
-
- public override void OnStart()
- {
- var currentGameObject = GetDefaultGameObject(targetGameObject.Value);
- if (currentGameObject != prevGameObject) {
- targetTransform = currentGameObject.GetComponent<Transform>();
- prevGameObject = currentGameObject;
- }
- }
-
- public override TaskStatus OnUpdate()
- {
- if (targetTransform == null) {
- Debug.LogWarning("Transform is null");
- return TaskStatus.Failure;
- }
-
- targetTransform.eulerAngles = eulerAngles.Value;
-
- return TaskStatus.Success;
- }
-
- public override void OnReset()
- {
- targetGameObject = null;
- eulerAngles = Vector3.zero;
- }
- }
-}
\ No newline at end of file diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/SetEulerAngles.cs.meta b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/SetEulerAngles.cs.meta deleted file mode 100644 index 4a20efd1..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/SetEulerAngles.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2
-guid: edad3f12ad10ba14aac656b7f431ff31
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/SetForwardVector.cs b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/SetForwardVector.cs deleted file mode 100644 index 6deec202..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/SetForwardVector.cs +++ /dev/null @@ -1,44 +0,0 @@ -using UnityEngine;
-
-namespace BehaviorDesigner.Runtime.Tasks.Basic.UnityTransform
-{
- [TaskCategory("Basic/Transform")]
- [TaskDescription("Sets the forward vector of the Transform. Returns Success.")]
- public class SetForwardVector : Action
- {
- [Tooltip("The GameObject that the task operates on. If null the task GameObject is used.")]
- public SharedGameObject targetGameObject;
- [Tooltip("The position of the Transform")]
- public SharedVector3 position;
-
- private Transform targetTransform;
- private GameObject prevGameObject;
-
- public override void OnStart()
- {
- var currentGameObject = GetDefaultGameObject(targetGameObject.Value);
- if (currentGameObject != prevGameObject) {
- targetTransform = currentGameObject.GetComponent<Transform>();
- prevGameObject = currentGameObject;
- }
- }
-
- public override TaskStatus OnUpdate()
- {
- if (targetTransform == null) {
- Debug.LogWarning("Transform is null");
- return TaskStatus.Failure;
- }
-
- targetTransform.forward = position.Value;
-
- return TaskStatus.Success;
- }
-
- public override void OnReset()
- {
- targetGameObject = null;
- position = Vector3.zero;
- }
- }
-}
\ No newline at end of file diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/SetForwardVector.cs.meta b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/SetForwardVector.cs.meta deleted file mode 100644 index 283c1b33..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/SetForwardVector.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2
-guid: 4cf669b5419d7294cb72c90881267c0c
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/SetLocalEulerAngles.cs b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/SetLocalEulerAngles.cs deleted file mode 100644 index fcb72a1a..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/SetLocalEulerAngles.cs +++ /dev/null @@ -1,44 +0,0 @@ -using UnityEngine;
-
-namespace BehaviorDesigner.Runtime.Tasks.Basic.UnityTransform
-{
- [TaskCategory("Basic/Transform")]
- [TaskDescription("Sets the local euler angles of the Transform. Returns Success.")]
- public class SetLocalEulerAngles : Action
- {
- [Tooltip("The GameObject that the task operates on. If null the task GameObject is used.")]
- public SharedGameObject targetGameObject;
- [Tooltip("The local euler angles of the Transform")]
- public SharedVector3 localEulerAngles;
-
- private Transform targetTransform;
- private GameObject prevGameObject;
-
- public override void OnStart()
- {
- var currentGameObject = GetDefaultGameObject(targetGameObject.Value);
- if (currentGameObject != prevGameObject) {
- targetTransform = currentGameObject.GetComponent<Transform>();
- prevGameObject = currentGameObject;
- }
- }
-
- public override TaskStatus OnUpdate()
- {
- if (targetTransform == null) {
- Debug.LogWarning("Transform is null");
- return TaskStatus.Failure;
- }
-
- targetTransform.localEulerAngles = localEulerAngles.Value;
-
- return TaskStatus.Success;
- }
-
- public override void OnReset()
- {
- targetGameObject = null;
- localEulerAngles = Vector3.zero;
- }
- }
-}
\ No newline at end of file diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/SetLocalEulerAngles.cs.meta b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/SetLocalEulerAngles.cs.meta deleted file mode 100644 index 644c7104..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/SetLocalEulerAngles.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2
-guid: 2e1ed691ebf9f154e88bb8be7319baad
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/SetLocalPosition.cs b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/SetLocalPosition.cs deleted file mode 100644 index 9ef9f235..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/SetLocalPosition.cs +++ /dev/null @@ -1,44 +0,0 @@ -using UnityEngine;
-
-namespace BehaviorDesigner.Runtime.Tasks.Basic.UnityTransform
-{
- [TaskCategory("Basic/Transform")]
- [TaskDescription("Sets the local position of the Transform. Returns Success.")]
- public class SetLocalPosition : Action
- {
- [Tooltip("The GameObject that the task operates on. If null the task GameObject is used.")]
- public SharedGameObject targetGameObject;
- [Tooltip("The local position of the Transform")]
- public SharedVector3 localPosition;
-
- private Transform targetTransform;
- private GameObject prevGameObject;
-
- public override void OnStart()
- {
- var currentGameObject = GetDefaultGameObject(targetGameObject.Value);
- if (currentGameObject != prevGameObject) {
- targetTransform = currentGameObject.GetComponent<Transform>();
- prevGameObject = currentGameObject;
- }
- }
-
- public override TaskStatus OnUpdate()
- {
- if (targetTransform == null) {
- Debug.LogWarning("Transform is null");
- return TaskStatus.Failure;
- }
-
- targetTransform.localPosition = localPosition.Value;
-
- return TaskStatus.Success;
- }
-
- public override void OnReset()
- {
- targetGameObject = null;
- localPosition = Vector3.zero;
- }
- }
-}
\ No newline at end of file diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/SetLocalPosition.cs.meta b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/SetLocalPosition.cs.meta deleted file mode 100644 index 53cc9193..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/SetLocalPosition.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2
-guid: 5af08673c7a3bb54c974bb23094d4587
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/SetLocalRotation.cs b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/SetLocalRotation.cs deleted file mode 100644 index f21d3b5a..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/SetLocalRotation.cs +++ /dev/null @@ -1,44 +0,0 @@ -using UnityEngine;
-
-namespace BehaviorDesigner.Runtime.Tasks.Basic.UnityTransform
-{
- [TaskCategory("Basic/Transform")]
- [TaskDescription("Sets the local rotation of the Transform. Returns Success.")]
- public class SetLocalRotation : Action
- {
- [Tooltip("The GameObject that the task operates on. If null the task GameObject is used.")]
- public SharedGameObject targetGameObject;
- [Tooltip("The local rotation of the Transform")]
- public SharedQuaternion localRotation;
-
- private Transform targetTransform;
- private GameObject prevGameObject;
-
- public override void OnStart()
- {
- var currentGameObject = GetDefaultGameObject(targetGameObject.Value);
- if (currentGameObject != prevGameObject) {
- targetTransform = currentGameObject.GetComponent<Transform>();
- prevGameObject = currentGameObject;
- }
- }
-
- public override TaskStatus OnUpdate()
- {
- if (targetTransform == null) {
- Debug.LogWarning("Transform is null");
- return TaskStatus.Failure;
- }
-
- targetTransform.localRotation = localRotation.Value;
-
- return TaskStatus.Success;
- }
-
- public override void OnReset()
- {
- targetGameObject = null;
- localRotation = Quaternion.identity;
- }
- }
-}
\ No newline at end of file diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/SetLocalRotation.cs.meta b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/SetLocalRotation.cs.meta deleted file mode 100644 index 26baaac4..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/SetLocalRotation.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2
-guid: de22c6e6826367540b2f25957757a1d4
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/SetLocalScale.cs b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/SetLocalScale.cs deleted file mode 100644 index 7b0f68ad..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/SetLocalScale.cs +++ /dev/null @@ -1,44 +0,0 @@ -using UnityEngine;
-
-namespace BehaviorDesigner.Runtime.Tasks.Basic.UnityTransform
-{
- [TaskCategory("Basic/Transform")]
- [TaskDescription("Sets the local scale of the Transform. Returns Success.")]
- public class SetLocalScale : Action
- {
- [Tooltip("The GameObject that the task operates on. If null the task GameObject is used.")]
- public SharedGameObject targetGameObject;
- [Tooltip("The local scale of the Transform")]
- public SharedVector3 localScale;
-
- private Transform targetTransform;
- private GameObject prevGameObject;
-
- public override void OnStart()
- {
- var currentGameObject = GetDefaultGameObject(targetGameObject.Value);
- if (currentGameObject != prevGameObject) {
- targetTransform = currentGameObject.GetComponent<Transform>();
- prevGameObject = currentGameObject;
- }
- }
-
- public override TaskStatus OnUpdate()
- {
- if (targetTransform == null) {
- Debug.LogWarning("Transform is null");
- return TaskStatus.Failure;
- }
-
- targetTransform.localScale = localScale.Value;
-
- return TaskStatus.Success;
- }
-
- public override void OnReset()
- {
- targetGameObject = null;
- localScale = Vector3.zero;
- }
- }
-}
\ No newline at end of file diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/SetLocalScale.cs.meta b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/SetLocalScale.cs.meta deleted file mode 100644 index 63025bea..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/SetLocalScale.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2
-guid: 354ce71974ea2b44ab820c8285f72421
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/SetParent.cs b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/SetParent.cs deleted file mode 100644 index 92673a8a..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/SetParent.cs +++ /dev/null @@ -1,44 +0,0 @@ -using UnityEngine;
-
-namespace BehaviorDesigner.Runtime.Tasks.Basic.UnityTransform
-{
- [TaskCategory("Basic/Transform")]
- [TaskDescription("Sets the parent of the Transform. Returns Success.")]
- public class SetParent : Action
- {
- [Tooltip("The GameObject that the task operates on. If null the task GameObject is used.")]
- public SharedGameObject targetGameObject;
- [Tooltip("The parent of the Transform")]
- public SharedTransform parent;
-
- private Transform targetTransform;
- private GameObject prevGameObject;
-
- public override void OnStart()
- {
- var currentGameObject = GetDefaultGameObject(targetGameObject.Value);
- if (currentGameObject != prevGameObject) {
- targetTransform = currentGameObject.GetComponent<Transform>();
- prevGameObject = currentGameObject;
- }
- }
-
- public override TaskStatus OnUpdate()
- {
- if (targetTransform == null) {
- Debug.LogWarning("Transform is null");
- return TaskStatus.Failure;
- }
-
- targetTransform.parent = parent.Value;
-
- return TaskStatus.Success;
- }
-
- public override void OnReset()
- {
- targetGameObject = null;
- parent = null;
- }
- }
-}
\ No newline at end of file diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/SetParent.cs.meta b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/SetParent.cs.meta deleted file mode 100644 index 17981286..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/SetParent.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2
-guid: a19c91d6c31b48d45b2ea97efeae14aa
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/SetPosition.cs b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/SetPosition.cs deleted file mode 100644 index 28bcf0b1..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/SetPosition.cs +++ /dev/null @@ -1,44 +0,0 @@ -using UnityEngine;
-
-namespace BehaviorDesigner.Runtime.Tasks.Basic.UnityTransform
-{
- [TaskCategory("Basic/Transform")]
- [TaskDescription("Sets the position of the Transform. Returns Success.")]
- public class SetPosition : Action
- {
- [Tooltip("The GameObject that the task operates on. If null the task GameObject is used.")]
- public SharedGameObject targetGameObject;
- [Tooltip("The position of the Transform")]
- public SharedVector3 position;
-
- private Transform targetTransform;
- private GameObject prevGameObject;
-
- public override void OnStart()
- {
- var currentGameObject = GetDefaultGameObject(targetGameObject.Value);
- if (currentGameObject != prevGameObject) {
- targetTransform = currentGameObject.GetComponent<Transform>();
- prevGameObject = currentGameObject;
- }
- }
-
- public override TaskStatus OnUpdate()
- {
- if (targetTransform == null) {
- Debug.LogWarning("Transform is null");
- return TaskStatus.Failure;
- }
-
- targetTransform.position = position.Value;
-
- return TaskStatus.Success;
- }
-
- public override void OnReset()
- {
- targetGameObject = null;
- position = Vector3.zero;
- }
- }
-}
\ No newline at end of file diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/SetPosition.cs.meta b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/SetPosition.cs.meta deleted file mode 100644 index 1273580e..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/SetPosition.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2
-guid: d0586a5078618624398df51fd677a2e0
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/SetRightVector.cs b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/SetRightVector.cs deleted file mode 100644 index 9479a024..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/SetRightVector.cs +++ /dev/null @@ -1,44 +0,0 @@ -using UnityEngine;
-
-namespace BehaviorDesigner.Runtime.Tasks.Basic.UnityTransform
-{
- [TaskCategory("Basic/Transform")]
- [TaskDescription("Sets the right vector of the Transform. Returns Success.")]
- public class SetRightVector : Action
- {
- [Tooltip("The GameObject that the task operates on. If null the task GameObject is used.")]
- public SharedGameObject targetGameObject;
- [Tooltip("The position of the Transform")]
- public SharedVector3 position;
-
- private Transform targetTransform;
- private GameObject prevGameObject;
-
- public override void OnStart()
- {
- var currentGameObject = GetDefaultGameObject(targetGameObject.Value);
- if (currentGameObject != prevGameObject) {
- targetTransform = currentGameObject.GetComponent<Transform>();
- prevGameObject = currentGameObject;
- }
- }
-
- public override TaskStatus OnUpdate()
- {
- if (targetTransform == null) {
- Debug.LogWarning("Transform is null");
- return TaskStatus.Failure;
- }
-
- targetTransform.right = position.Value;
-
- return TaskStatus.Success;
- }
-
- public override void OnReset()
- {
- targetGameObject = null;
- position = Vector3.zero;
- }
- }
-}
\ No newline at end of file diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/SetRightVector.cs.meta b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/SetRightVector.cs.meta deleted file mode 100644 index a27cf794..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/SetRightVector.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2
-guid: 4629bee77af22ca42a716dfa8ad3e669
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/SetRotation.cs b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/SetRotation.cs deleted file mode 100644 index 8885fa78..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/SetRotation.cs +++ /dev/null @@ -1,44 +0,0 @@ -using UnityEngine;
-
-namespace BehaviorDesigner.Runtime.Tasks.Basic.UnityTransform
-{
- [TaskCategory("Basic/Transform")]
- [TaskDescription("Sets the rotation of the Transform. Returns Success.")]
- public class SetRotation : Action
- {
- [Tooltip("The GameObject that the task operates on. If null the task GameObject is used.")]
- public SharedGameObject targetGameObject;
- [Tooltip("The rotation of the Transform")]
- public SharedQuaternion rotation;
-
- private Transform targetTransform;
- private GameObject prevGameObject;
-
- public override void OnStart()
- {
- var currentGameObject = GetDefaultGameObject(targetGameObject.Value);
- if (currentGameObject != prevGameObject) {
- targetTransform = currentGameObject.GetComponent<Transform>();
- prevGameObject = currentGameObject;
- }
- }
-
- public override TaskStatus OnUpdate()
- {
- if (targetTransform == null) {
- Debug.LogWarning("Transform is null");
- return TaskStatus.Failure;
- }
-
- targetTransform.rotation = rotation.Value;
-
- return TaskStatus.Success;
- }
-
- public override void OnReset()
- {
- targetGameObject = null;
- rotation = Quaternion.identity;
- }
- }
-}
\ No newline at end of file diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/SetRotation.cs.meta b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/SetRotation.cs.meta deleted file mode 100644 index 53f60e32..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/SetRotation.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2
-guid: fb61cc6175ff14c4d84c3c72541bc30d
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/SetUpVector.cs b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/SetUpVector.cs deleted file mode 100644 index 8edbbc3b..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/SetUpVector.cs +++ /dev/null @@ -1,44 +0,0 @@ -using UnityEngine;
-
-namespace BehaviorDesigner.Runtime.Tasks.Basic.UnityTransform
-{
- [TaskCategory("Basic/Transform")]
- [TaskDescription("Sets the up vector of the Transform. Returns Success.")]
- public class SetUpVector : Action
- {
- [Tooltip("The GameObject that the task operates on. If null the task GameObject is used.")]
- public SharedGameObject targetGameObject;
- [Tooltip("The position of the Transform")]
- public SharedVector3 position;
-
- private Transform targetTransform;
- private GameObject prevGameObject;
-
- public override void OnStart()
- {
- var currentGameObject = GetDefaultGameObject(targetGameObject.Value);
- if (currentGameObject != prevGameObject) {
- targetTransform = currentGameObject.GetComponent<Transform>();
- prevGameObject = currentGameObject;
- }
- }
-
- public override TaskStatus OnUpdate()
- {
- if (targetTransform == null) {
- Debug.LogWarning("Transform is null");
- return TaskStatus.Failure;
- }
-
- targetTransform.up = position.Value;
-
- return TaskStatus.Success;
- }
-
- public override void OnReset()
- {
- targetGameObject = null;
- position = Vector3.zero;
- }
- }
-}
\ No newline at end of file diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/SetUpVector.cs.meta b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/SetUpVector.cs.meta deleted file mode 100644 index 4b2cc9fe..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/SetUpVector.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2
-guid: 2e65dee462c24694a9835796a770af6e
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/Translate.cs b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/Translate.cs deleted file mode 100644 index bc636713..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/Translate.cs +++ /dev/null @@ -1,47 +0,0 @@ -using UnityEngine;
-
-namespace BehaviorDesigner.Runtime.Tasks.Basic.UnityTransform
-{
- [TaskCategory("Basic/Transform")]
- [TaskDescription("Moves the transform in the direction and distance of translation. Returns Success.")]
- public class Translate : Action
- {
- [Tooltip("The GameObject that the task operates on. If null the task GameObject is used.")]
- public SharedGameObject targetGameObject;
- [Tooltip("Move direction and distance")]
- public SharedVector3 translation;
- [Tooltip("Specifies which axis the rotation is relative to")]
- public Space relativeTo = Space.Self;
-
- private Transform targetTransform;
- private GameObject prevGameObject;
-
- public override void OnStart()
- {
- var currentGameObject = GetDefaultGameObject(targetGameObject.Value);
- if (currentGameObject != prevGameObject) {
- targetTransform = currentGameObject.GetComponent<Transform>();
- prevGameObject = currentGameObject;
- }
- }
-
- public override TaskStatus OnUpdate()
- {
- if (targetTransform == null) {
- Debug.LogWarning("Transform is null");
- return TaskStatus.Failure;
- }
-
- targetTransform.Translate(translation.Value, relativeTo);
-
- return TaskStatus.Success;
- }
-
- public override void OnReset()
- {
- targetGameObject = null;
- translation = Vector3.zero;
- relativeTo = Space.Self;
- }
- }
-}
\ No newline at end of file diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/Translate.cs.meta b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/Translate.cs.meta deleted file mode 100644 index 7a7a81b5..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Transform/Translate.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2
-guid: d4a788705b79d3745a26867acf47a63a
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
|