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/Conditionals/Physics/HasExitedTrigger2D.cs | |
parent | 8b04ea73e540067f83870b61d89db4868fea5e8a (diff) |
* move folder
Diffstat (limited to 'Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/Physics/HasExitedTrigger2D.cs')
-rw-r--r-- | Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/Physics/HasExitedTrigger2D.cs | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/Physics/HasExitedTrigger2D.cs b/Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/Physics/HasExitedTrigger2D.cs deleted file mode 100644 index 95ad2f1a..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/Physics/HasExitedTrigger2D.cs +++ /dev/null @@ -1,41 +0,0 @@ -using UnityEngine;
-
-namespace BehaviorDesigner.Runtime.Tasks
-{
- [TaskDescription("Returns success when an object exits the 2D trigger.")]
- [TaskCategory("Physics")]
- [HelpURL("http://www.opsive.com/assets/BehaviorDesigner/documentation.php?id=110")]
- public class HasExitedTrigger2D : Conditional
- {
- [Tooltip("The tag of the GameObject to check for a trigger against")]
- public SharedString tag = "";
- [Tooltip("The object that exited the trigger")]
- public SharedGameObject otherGameObject;
-
- private bool exitedTrigger = false;
-
- public override TaskStatus OnUpdate()
- {
- return exitedTrigger ? TaskStatus.Success : TaskStatus.Failure;
- }
-
- public override void OnEnd()
- {
- exitedTrigger = false;
- }
-
- public override void OnTriggerExit2D(Collider2D other)
- {
- if (string.IsNullOrEmpty(tag.Value) || tag.Value.Equals(other.gameObject.tag)) {
- otherGameObject.Value = other.gameObject;
- exitedTrigger = true;
- }
- }
-
- public override void OnReset()
- {
- tag = "";
- otherGameObject = null;
- }
- }
-}
|