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/BoxCollider2D | |
parent | 8b04ea73e540067f83870b61d89db4868fea5e8a (diff) |
* move folder
Diffstat (limited to 'Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/BoxCollider2D')
4 files changed, 0 insertions, 105 deletions
diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/BoxCollider2D/GetSize.cs b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/BoxCollider2D/GetSize.cs deleted file mode 100644 index e539eb30..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/BoxCollider2D/GetSize.cs +++ /dev/null @@ -1,45 +0,0 @@ -using UnityEngine;
-
-namespace BehaviorDesigner.Runtime.Tasks.Basic.UnityBoxCollider2D
-{
- [TaskCategory("Basic/BoxCollider2D")]
- [TaskDescription("Stores the size of the BoxCollider2D. Returns Success.")]
- public class GetSize : Action
- {
- [Tooltip("The GameObject that the task operates on. If null the task GameObject is used.")]
- public SharedGameObject targetGameObject;
- [Tooltip("The size of the BoxCollider2D")]
- [RequiredField]
- public SharedVector2 storeValue;
-
- private BoxCollider2D boxCollider2D;
- private GameObject prevGameObject;
-
- public override void OnStart()
- {
- var currentGameObject = GetDefaultGameObject(targetGameObject.Value);
- if (currentGameObject != prevGameObject) {
- boxCollider2D = currentGameObject.GetComponent<BoxCollider2D>();
- prevGameObject = currentGameObject;
- }
- }
-
- public override TaskStatus OnUpdate()
- {
- if (boxCollider2D == null) {
- Debug.LogWarning("BoxCollider2D is null");
- return TaskStatus.Failure;
- }
-
- storeValue.Value = boxCollider2D.size;
-
- return TaskStatus.Success;
- }
-
- public override void OnReset()
- {
- targetGameObject = null;
- storeValue = Vector2.zero;
- }
- }
-}
diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/BoxCollider2D/GetSize.cs.meta b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/BoxCollider2D/GetSize.cs.meta deleted file mode 100644 index 362df45f..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/BoxCollider2D/GetSize.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2
-guid: c69113b787759f340aacbb9d99a6d654
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/BoxCollider2D/SetSize.cs b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/BoxCollider2D/SetSize.cs deleted file mode 100644 index 5de4a500..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/BoxCollider2D/SetSize.cs +++ /dev/null @@ -1,44 +0,0 @@ -using UnityEngine;
-
-namespace BehaviorDesigner.Runtime.Tasks.Basic.UnityBoxCollider2D
-{
- [TaskCategory("Basic/BoxCollider2D")]
- [TaskDescription("Sets the size of the BoxCollider2D. Returns Success.")]
- public class SetSize : Action
- {
- [Tooltip("The GameObject that the task operates on. If null the task GameObject is used.")]
- public SharedGameObject targetGameObject;
- [Tooltip("The size of the BoxCollider2D")]
- public SharedVector2 size;
-
- private BoxCollider2D boxCollider2D;
- private GameObject prevGameObject;
-
- public override void OnStart()
- {
- var currentGameObject = GetDefaultGameObject(targetGameObject.Value);
- if (currentGameObject != prevGameObject) {
- boxCollider2D = currentGameObject.GetComponent<BoxCollider2D>();
- prevGameObject = currentGameObject;
- }
- }
-
- public override TaskStatus OnUpdate()
- {
- if (boxCollider2D == null) {
- Debug.LogWarning("BoxCollider2D is null");
- return TaskStatus.Failure;
- }
-
- boxCollider2D.size = size.Value;
-
- return TaskStatus.Success;
- }
-
- public override void OnReset()
- {
- targetGameObject = null;
- size = Vector2.zero;
- }
- }
-}
diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/BoxCollider2D/SetSize.cs.meta b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/BoxCollider2D/SetSize.cs.meta deleted file mode 100644 index f5af4e82..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/BoxCollider2D/SetSize.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2
-guid: 1875fd00045d98848b028015a17aeeaf
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
|