summaryrefslogtreecommitdiff
path: root/Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/Physics/HasExitedTrigger.cs
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2022-03-10 14:07:40 +0800
committerchai <chaifix@163.com>2022-03-10 14:07:40 +0800
commit22891bf59032ba88262824255a706d652031384b (patch)
tree7595439ba9966c9402d37e37cee5e8cf098757d5 /Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/Physics/HasExitedTrigger.cs
parent8b04ea73e540067f83870b61d89db4868fea5e8a (diff)
* move folder
Diffstat (limited to 'Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/Physics/HasExitedTrigger.cs')
-rw-r--r--Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/Physics/HasExitedTrigger.cs41
1 files changed, 0 insertions, 41 deletions
diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/Physics/HasExitedTrigger.cs b/Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/Physics/HasExitedTrigger.cs
deleted file mode 100644
index ec33e923..00000000
--- a/Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/Physics/HasExitedTrigger.cs
+++ /dev/null
@@ -1,41 +0,0 @@
-using UnityEngine;
-
-namespace BehaviorDesigner.Runtime.Tasks
-{
- [TaskDescription("Returns success when an object exits the trigger.")]
- [TaskCategory("Physics")]
- [HelpURL("http://www.opsive.com/assets/BehaviorDesigner/documentation.php?id=110")]
- public class HasExitedTrigger : 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 OnTriggerExit(Collider 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;
- }
- }
-} \ No newline at end of file