From 22891bf59032ba88262824255a706d652031384b Mon Sep 17 00:00:00 2001 From: chai Date: Thu, 10 Mar 2022 14:07:40 +0800 Subject: * move folder --- .../Runtime/Conditionals/HasReceivedEvent.cs | 114 --------------------- .../Runtime/Conditionals/HasReceivedEvent.cs.meta | 8 -- .../Runtime/Conditionals/Physics.meta | 4 - .../Conditionals/Physics/HasEnteredCollision.cs | 41 -------- .../Physics/HasEnteredCollision.cs.meta | 8 -- .../Conditionals/Physics/HasEnteredCollision2D.cs | 41 -------- .../Physics/HasEnteredCollision2D.cs.meta | 8 -- .../Conditionals/Physics/HasEnteredTrigger.cs | 41 -------- .../Conditionals/Physics/HasEnteredTrigger.cs.meta | 8 -- .../Conditionals/Physics/HasEnteredTrigger2D.cs | 41 -------- .../Physics/HasEnteredTrigger2D.cs.meta | 8 -- .../Conditionals/Physics/HasExitedCollision.cs | 40 -------- .../Physics/HasExitedCollision.cs.meta | 8 -- .../Conditionals/Physics/HasExitedCollision2D.cs | 41 -------- .../Physics/HasExitedCollision2D.cs.meta | 8 -- .../Conditionals/Physics/HasExitedTrigger.cs | 41 -------- .../Conditionals/Physics/HasExitedTrigger.cs.meta | 8 -- .../Conditionals/Physics/HasExitedTrigger2D.cs | 41 -------- .../Physics/HasExitedTrigger2D.cs.meta | 8 -- .../Runtime/Conditionals/RandomProbability.cs | 44 -------- .../Runtime/Conditionals/RandomProbability.cs.meta | 7 -- .../Runtime/Conditionals/Reflection.meta | 4 - .../Conditionals/Reflection/CompareFieldValue.cs | 61 ----------- .../Reflection/CompareFieldValue.cs.meta | 8 -- .../Reflection/ComparePropertyValue.cs | 61 ----------- .../Reflection/ComparePropertyValue.cs.meta | 8 -- 26 files changed, 710 deletions(-) delete mode 100644 Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/HasReceivedEvent.cs delete mode 100644 Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/HasReceivedEvent.cs.meta delete mode 100644 Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/Physics.meta delete mode 100644 Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/Physics/HasEnteredCollision.cs delete mode 100644 Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/Physics/HasEnteredCollision.cs.meta delete mode 100644 Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/Physics/HasEnteredCollision2D.cs delete mode 100644 Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/Physics/HasEnteredCollision2D.cs.meta delete mode 100644 Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/Physics/HasEnteredTrigger.cs delete mode 100644 Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/Physics/HasEnteredTrigger.cs.meta delete mode 100644 Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/Physics/HasEnteredTrigger2D.cs delete mode 100644 Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/Physics/HasEnteredTrigger2D.cs.meta delete mode 100644 Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/Physics/HasExitedCollision.cs delete mode 100644 Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/Physics/HasExitedCollision.cs.meta delete mode 100644 Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/Physics/HasExitedCollision2D.cs delete mode 100644 Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/Physics/HasExitedCollision2D.cs.meta delete mode 100644 Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/Physics/HasExitedTrigger.cs delete mode 100644 Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/Physics/HasExitedTrigger.cs.meta delete mode 100644 Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/Physics/HasExitedTrigger2D.cs delete mode 100644 Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/Physics/HasExitedTrigger2D.cs.meta delete mode 100644 Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/RandomProbability.cs delete mode 100644 Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/RandomProbability.cs.meta delete mode 100644 Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/Reflection.meta delete mode 100644 Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/Reflection/CompareFieldValue.cs delete mode 100644 Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/Reflection/CompareFieldValue.cs.meta delete mode 100644 Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/Reflection/ComparePropertyValue.cs delete mode 100644 Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/Reflection/ComparePropertyValue.cs.meta (limited to 'Assets/ThirdParty/Behavior Designer/Runtime/Conditionals') diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/HasReceivedEvent.cs b/Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/HasReceivedEvent.cs deleted file mode 100644 index 964ecc3a..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/HasReceivedEvent.cs +++ /dev/null @@ -1,114 +0,0 @@ -namespace BehaviorDesigner.Runtime.Tasks -{ - [TaskDescription("Returns success as soon as the event specified by eventName has been received.")] - [HelpURL("http://www.opsive.com/assets/BehaviorDesigner/documentation.php?id=123")] - [TaskIcon("{SkinColor}HasReceivedEventIcon.png")] - public class HasReceivedEvent : Conditional - { - [Tooltip("The name of the event to receive")] - public SharedString eventName = ""; - [Tooltip("Optionally store the first sent argument")] - [SharedRequired] - public SharedVariable storedValue1; - [Tooltip("Optionally store the second sent argument")] - [SharedRequired] - public SharedVariable storedValue2; - [Tooltip("Optionally store the third sent argument")] - [SharedRequired] - public SharedVariable storedValue3; - - private bool eventReceived = false; - private bool registered = false; - - public override void OnStart() - { - // Let the behavior tree know that we are interested in receiving the event specified - if (!registered) { - Owner.RegisterEvent(eventName.Value, ReceivedEvent); - Owner.RegisterEvent(eventName.Value, ReceivedEvent); - Owner.RegisterEvent(eventName.Value, ReceivedEvent); - Owner.RegisterEvent(eventName.Value, ReceivedEvent); - registered = true; - } - } - - public override TaskStatus OnUpdate() - { - return eventReceived ? TaskStatus.Success : TaskStatus.Failure; - } - - public override void OnEnd() - { - if (eventReceived) { - Owner.UnregisterEvent(eventName.Value, ReceivedEvent); - Owner.UnregisterEvent(eventName.Value, ReceivedEvent); - Owner.UnregisterEvent(eventName.Value, ReceivedEvent); - Owner.UnregisterEvent(eventName.Value, ReceivedEvent); - registered = false; - } - eventReceived = false; - } - - private void ReceivedEvent() - { - eventReceived = true; - } - - private void ReceivedEvent(object arg1) - { - ReceivedEvent(); - - if (storedValue1 != null && !storedValue1.IsNone) { - storedValue1.SetValue(arg1); - } - } - - private void ReceivedEvent(object arg1, object arg2) - { - ReceivedEvent(); - - if (storedValue1 != null && !storedValue1.IsNone) { - storedValue1.SetValue(arg1); - } - - if (storedValue2 != null && !storedValue2.IsNone) { - storedValue2.SetValue(arg2); - } - } - - private void ReceivedEvent(object arg1, object arg2, object arg3) - { - ReceivedEvent(); - - if (storedValue1 != null && !storedValue1.IsNone) { - storedValue1.SetValue(arg1); - } - - if (storedValue2 != null && !storedValue2.IsNone) { - storedValue2.SetValue(arg2); - } - - if (storedValue3 != null && !storedValue3.IsNone) { - storedValue3.SetValue(arg3); - } - } - - public override void OnBehaviorComplete() - { - // Stop receiving the event when the behavior tree is complete - Owner.UnregisterEvent(eventName.Value, ReceivedEvent); - Owner.UnregisterEvent(eventName.Value, ReceivedEvent); - Owner.UnregisterEvent(eventName.Value, ReceivedEvent); - Owner.UnregisterEvent(eventName.Value, ReceivedEvent); - - eventReceived = false; - registered = false; - } - - public override void OnReset() - { - // Reset the properties back to their original values - eventName = ""; - } - } -} \ No newline at end of file diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/HasReceivedEvent.cs.meta b/Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/HasReceivedEvent.cs.meta deleted file mode 100644 index 9fd1d4e1..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/HasReceivedEvent.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 7c0c7f545b074cb48bd552b038ede7af -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/Physics.meta b/Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/Physics.meta deleted file mode 100644 index 8b5c7dcc..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/Physics.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: 0c5a19b8daa7dbf4abe7505888ef0376 -DefaultImporter: - userData: diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/Physics/HasEnteredCollision.cs b/Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/Physics/HasEnteredCollision.cs deleted file mode 100644 index 480e4093..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/Physics/HasEnteredCollision.cs +++ /dev/null @@ -1,41 +0,0 @@ -using UnityEngine; - -namespace BehaviorDesigner.Runtime.Tasks -{ - [TaskDescription("Returns success when a collision starts.")] - [TaskCategory("Physics")] - [HelpURL("http://www.opsive.com/assets/BehaviorDesigner/documentation.php?id=110")] - public class HasEnteredCollision : Conditional - { - [Tooltip("The tag of the GameObject to check for a collision against")] - public SharedString tag = ""; - [Tooltip("The object that started the collision")] - public SharedGameObject collidedGameObject; - - private bool enteredCollision = false; - - public override TaskStatus OnUpdate() - { - return enteredCollision ? TaskStatus.Success : TaskStatus.Failure; - } - - public override void OnEnd() - { - enteredCollision = false; - } - - public override void OnCollisionEnter(Collision collision) - { - if (string.IsNullOrEmpty(tag.Value) || tag.Value.Equals(collision.gameObject.tag)) { - collidedGameObject.Value = collision.gameObject; - enteredCollision = true; - } - } - - public override void OnReset() - { - tag = ""; - collidedGameObject = null; - } - } -} \ No newline at end of file diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/Physics/HasEnteredCollision.cs.meta b/Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/Physics/HasEnteredCollision.cs.meta deleted file mode 100644 index b6f4d04b..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/Physics/HasEnteredCollision.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: c1841a802d7ceda449423f001897ecae -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/Physics/HasEnteredCollision2D.cs b/Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/Physics/HasEnteredCollision2D.cs deleted file mode 100644 index 51feb050..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/Physics/HasEnteredCollision2D.cs +++ /dev/null @@ -1,41 +0,0 @@ -using UnityEngine; - -namespace BehaviorDesigner.Runtime.Tasks -{ - [TaskDescription("Returns success when a 2D collision starts.")] - [TaskCategory("Physics")] - [HelpURL("http://www.opsive.com/assets/BehaviorDesigner/documentation.php?id=110")] - public class HasEnteredCollision2D : Conditional - { - [Tooltip("The tag of the GameObject to check for a collision against")] - public SharedString tag = ""; - [Tooltip("The object that started the collision")] - public SharedGameObject collidedGameObject; - - private bool enteredCollision = false; - - public override TaskStatus OnUpdate() - { - return enteredCollision ? TaskStatus.Success : TaskStatus.Failure; - } - - public override void OnEnd() - { - enteredCollision = false; - } - - public override void OnCollisionEnter2D(Collision2D collision) - { - if (string.IsNullOrEmpty(tag.Value) || tag.Value.Equals(collision.gameObject.tag)) { - collidedGameObject.Value = collision.gameObject; - enteredCollision = true; - } - } - - public override void OnReset() - { - tag = ""; - collidedGameObject = null; - } - } -} diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/Physics/HasEnteredCollision2D.cs.meta b/Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/Physics/HasEnteredCollision2D.cs.meta deleted file mode 100644 index 1f0e945e..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/Physics/HasEnteredCollision2D.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 0ac128198630a2d4b9fee93cc9a1f8fd -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/Physics/HasEnteredTrigger.cs b/Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/Physics/HasEnteredTrigger.cs deleted file mode 100644 index 648850fd..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/Physics/HasEnteredTrigger.cs +++ /dev/null @@ -1,41 +0,0 @@ -using UnityEngine; - -namespace BehaviorDesigner.Runtime.Tasks -{ - [TaskDescription("Returns success when an object enters the trigger.")] - [TaskCategory("Physics")] - [HelpURL("http://www.opsive.com/assets/BehaviorDesigner/documentation.php?id=110")] - public class HasEnteredTrigger : Conditional - { - [Tooltip("The tag of the GameObject to check for a trigger against")] - public SharedString tag = ""; - [Tooltip("The object that entered the trigger")] - public SharedGameObject otherGameObject; - - private bool enteredTrigger = false; - - public override TaskStatus OnUpdate() - { - return enteredTrigger ? TaskStatus.Success : TaskStatus.Failure; - } - - public override void OnEnd() - { - enteredTrigger = false; - } - - public override void OnTriggerEnter(Collider other) - { - if (string.IsNullOrEmpty(tag.Value) || tag.Value.Equals(other.gameObject.tag)) { - otherGameObject.Value = other.gameObject; - enteredTrigger = true; - } - } - - public override void OnReset() - { - tag = ""; - otherGameObject = null; - } - } -} \ No newline at end of file diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/Physics/HasEnteredTrigger.cs.meta b/Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/Physics/HasEnteredTrigger.cs.meta deleted file mode 100644 index bccb63ad..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/Physics/HasEnteredTrigger.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 5987844efe0fca7499cec04a9e3962cc -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/Physics/HasEnteredTrigger2D.cs b/Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/Physics/HasEnteredTrigger2D.cs deleted file mode 100644 index 05dfe9ec..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/Physics/HasEnteredTrigger2D.cs +++ /dev/null @@ -1,41 +0,0 @@ -using UnityEngine; - -namespace BehaviorDesigner.Runtime.Tasks -{ - [TaskDescription("Returns success when an object enters the 2D trigger.")] - [TaskCategory("Physics")] - [HelpURL("http://www.opsive.com/assets/BehaviorDesigner/documentation.php?id=110")] - public class HasEnteredTrigger2D : Conditional - { - [Tooltip("The tag of the GameObject to check for a trigger against")] - public SharedString tag = ""; - [Tooltip("The object that entered the trigger")] - public SharedGameObject otherGameObject; - - private bool enteredTrigger = false; - - public override TaskStatus OnUpdate() - { - return enteredTrigger ? TaskStatus.Success : TaskStatus.Failure; - } - - public override void OnEnd() - { - enteredTrigger = false; - } - - public override void OnTriggerEnter2D(Collider2D other) - { - if (string.IsNullOrEmpty(tag.Value) || tag.Value.Equals(other.gameObject.tag)) { - otherGameObject.Value = other.gameObject; - enteredTrigger = true; - } - } - - public override void OnReset() - { - tag = ""; - otherGameObject = null; - } - } -} diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/Physics/HasEnteredTrigger2D.cs.meta b/Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/Physics/HasEnteredTrigger2D.cs.meta deleted file mode 100644 index 4e98e7c7..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/Physics/HasEnteredTrigger2D.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 84e2afb791fe67243a15e45e4af81bb4 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/Physics/HasExitedCollision.cs b/Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/Physics/HasExitedCollision.cs deleted file mode 100644 index 05a4fe3d..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/Physics/HasExitedCollision.cs +++ /dev/null @@ -1,40 +0,0 @@ -using UnityEngine; - -namespace BehaviorDesigner.Runtime.Tasks -{ - [TaskDescription("Returns success when a collision ends.")] - [TaskCategory("Physics")] - [HelpURL("http://www.opsive.com/assets/BehaviorDesigner/documentation.php?id=110")] - public class HasExitedCollision : Conditional - { - [Tooltip("The tag of the GameObject to check for a collision against")] - public SharedString tag = ""; - [Tooltip("The object that exited the collision")] - public SharedGameObject collidedGameObject; - - private bool exitedCollision = false; - - public override TaskStatus OnUpdate() - { - return exitedCollision ? TaskStatus.Success : TaskStatus.Failure; - } - - public override void OnEnd() - { - exitedCollision = false; - } - - public override void OnCollisionExit(Collision collision) - { - if (string.IsNullOrEmpty(tag.Value) || tag.Value.Equals(collision.gameObject.tag)) { - collidedGameObject.Value = collision.gameObject; - exitedCollision = true; - } - } - - public override void OnReset() - { - collidedGameObject = null; - } - } -} \ No newline at end of file diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/Physics/HasExitedCollision.cs.meta b/Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/Physics/HasExitedCollision.cs.meta deleted file mode 100644 index 40e22c8b..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/Physics/HasExitedCollision.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 900905a3e42f74c49a6e503349ee651e -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/Physics/HasExitedCollision2D.cs b/Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/Physics/HasExitedCollision2D.cs deleted file mode 100644 index e5a1a03a..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/Physics/HasExitedCollision2D.cs +++ /dev/null @@ -1,41 +0,0 @@ -using UnityEngine; - -namespace BehaviorDesigner.Runtime.Tasks -{ - [TaskDescription("Returns success when a 2D collision ends.")] - [TaskCategory("Physics")] - [HelpURL("http://www.opsive.com/assets/BehaviorDesigner/documentation.php?id=110")] - public class HasExitedCollision2D : Conditional - { - [Tooltip("The tag of the GameObject to check for a collision against")] - public SharedString tag = ""; - [Tooltip("The object that exited the collision")] - public SharedGameObject collidedGameObject; - - private bool exitedCollision = false; - - public override TaskStatus OnUpdate() - { - return exitedCollision ? TaskStatus.Success : TaskStatus.Failure; - } - - public override void OnEnd() - { - exitedCollision = false; - } - - public override void OnCollisionExit2D(Collision2D collision) - { - if (string.IsNullOrEmpty(tag.Value) || tag.Value.Equals(collision.gameObject.tag)) { - collidedGameObject.Value = collision.gameObject; - exitedCollision = true; - } - } - - public override void OnReset() - { - tag = ""; - collidedGameObject = null; - } - } -} diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/Physics/HasExitedCollision2D.cs.meta b/Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/Physics/HasExitedCollision2D.cs.meta deleted file mode 100644 index 48510c2a..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/Physics/HasExitedCollision2D.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 31cf8edd114ac5c4db22ec65babb3dd3 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: 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 diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/Physics/HasExitedTrigger.cs.meta b/Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/Physics/HasExitedTrigger.cs.meta deleted file mode 100644 index 83c2828f..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/Physics/HasExitedTrigger.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: c7ccd4a2c35d4c748b65ccd086e777e1 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: 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; - } - } -} diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/Physics/HasExitedTrigger2D.cs.meta b/Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/Physics/HasExitedTrigger2D.cs.meta deleted file mode 100644 index 3d6d4f8a..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/Physics/HasExitedTrigger2D.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: ff0486d46da2f7844ac74c6e2ad5af89 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/RandomProbability.cs b/Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/RandomProbability.cs deleted file mode 100644 index e971bb3d..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/RandomProbability.cs +++ /dev/null @@ -1,44 +0,0 @@ -namespace BehaviorDesigner.Runtime.Tasks -{ - [TaskDescription("The random probability task will return success when the random probability is above the succeed probability. It will otherwise return failure.")] - [HelpURL("http://www.opsive.com/assets/BehaviorDesigner/documentation.php?id=33")] - public class RandomProbability : Conditional - { - [Tooltip("The chance that the task will return success")] - public SharedFloat successProbability = 0.5f; - [Tooltip("Seed the random number generator to make things easier to debug")] - public SharedInt seed; - [Tooltip("Do we want to use the seed?")] - public SharedBool useSeed; - - private System.Random random; - - public override void OnAwake() - { - // If specified, use the seed provided. - if (useSeed.Value) { - random = new System.Random(seed.Value); - } else { - random = new System.Random(); - } - } - - public override TaskStatus OnUpdate() - { - // Return success if random value is less than the success probability. Otherwise return failure. - float randomValue = (float)random.NextDouble(); - if (randomValue < successProbability.Value) { - return TaskStatus.Success; - } - return TaskStatus.Failure; - } - - public override void OnReset() - { - // Reset the public properties back to their original values - successProbability = 0.5f; - seed = 0; - useSeed = false; - } - } -} \ No newline at end of file diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/RandomProbability.cs.meta b/Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/RandomProbability.cs.meta deleted file mode 100644 index 9c3993af..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/RandomProbability.cs.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 468a21510e9558c49a47238ebe4c2270 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/Reflection.meta b/Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/Reflection.meta deleted file mode 100644 index e671a26f..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/Reflection.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: caf1fead4d83193488aaa4560c36880c -DefaultImporter: - userData: diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/Reflection/CompareFieldValue.cs b/Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/Reflection/CompareFieldValue.cs deleted file mode 100644 index d66bf706..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/Reflection/CompareFieldValue.cs +++ /dev/null @@ -1,61 +0,0 @@ -using UnityEngine; -using System; -using System.Reflection; - -namespace BehaviorDesigner.Runtime.Tasks -{ - [TaskDescription("Compares the field value to the value specified. Returns success if the values are the same.")] - [HelpURL("http://www.opsive.com/assets/BehaviorDesigner/documentation.php?id=151")] - [TaskCategory("Reflection")] - [TaskIcon("{SkinColor}ReflectionIcon.png")] - public class CompareFieldValue : Conditional - { - [Tooltip("The GameObject to compare the field on")] - public SharedGameObject targetGameObject; - [Tooltip("The component to compare the field on")] - public SharedString componentName; - [Tooltip("The name of the field")] - public SharedString fieldName; - [Tooltip("The value to compare to")] - public SharedVariable compareValue; - - public override TaskStatus OnUpdate() - { - if (compareValue == null) { - Debug.LogWarning("Unable to compare field - compare value is null"); - return TaskStatus.Failure; - } - - var type = TaskUtility.GetTypeWithinAssembly(componentName.Value); - if (type == null) { - Debug.LogWarning("Unable to compare field - type is null"); - return TaskStatus.Failure; - } - - var component = GetDefaultGameObject(targetGameObject.Value).GetComponent(type); - if (component == null) { - Debug.LogWarning("Unable to compare the field with component " + componentName.Value); - return TaskStatus.Failure; - } - - // If you are receiving a compiler error on the Windows Store platform see this topic: - // http://www.opsive.com/assets/BehaviorDesigner/documentation.php?id=46 - var field = component.GetType().GetField(fieldName.Value); - var fieldValue = field.GetValue(component); - - if (fieldValue == null && compareValue.GetValue() == null) { - return TaskStatus.Success; - } - - return fieldValue.Equals(compareValue.GetValue()) ? TaskStatus.Success : TaskStatus.Failure; - } - - public override void OnReset() - { - targetGameObject = null; - componentName = null; - fieldName = null; - compareValue = null; - } - } -} \ No newline at end of file diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/Reflection/CompareFieldValue.cs.meta b/Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/Reflection/CompareFieldValue.cs.meta deleted file mode 100644 index 42f0e6bb..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/Reflection/CompareFieldValue.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: cc6496fb6757b684c8cc0c4ac8929319 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/Reflection/ComparePropertyValue.cs b/Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/Reflection/ComparePropertyValue.cs deleted file mode 100644 index 4f7fbdf1..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/Reflection/ComparePropertyValue.cs +++ /dev/null @@ -1,61 +0,0 @@ -using UnityEngine; -using System; -using System.Reflection; - -namespace BehaviorDesigner.Runtime.Tasks -{ - [TaskDescription("Compares the property value to the value specified. Returns success if the values are the same.")] - [HelpURL("http://www.opsive.com/assets/BehaviorDesigner/documentation.php?id=152")] - [TaskCategory("Reflection")] - [TaskIcon("{SkinColor}ReflectionIcon.png")] - public class ComparePropertyValue : Conditional - { - [Tooltip("The GameObject to compare the property of")] - public SharedGameObject targetGameObject; - [Tooltip("The component to compare the property of")] - public SharedString componentName; - [Tooltip("The name of the property")] - public SharedString propertyName; - [Tooltip("The value to compare to")] - public SharedVariable compareValue; - - public override TaskStatus OnUpdate() - { - if (compareValue == null) { - Debug.LogWarning("Unable to compare field - compare value is null"); - return TaskStatus.Failure; - } - - var type = TaskUtility.GetTypeWithinAssembly(componentName.Value); - if (type == null) { - Debug.LogWarning("Unable to compare property - type is null"); - return TaskStatus.Failure; - } - - var component = GetDefaultGameObject(targetGameObject.Value).GetComponent(type); - if (component == null) { - Debug.LogWarning("Unable to compare the property with component " + componentName.Value); - return TaskStatus.Failure; - } - - // If you are receiving a compiler error on the Windows Store platform see this topic: - // http://www.opsive.com/assets/BehaviorDesigner/documentation.php?id=46 - var property = component.GetType().GetProperty(propertyName.Value); - var propertyValue = property.GetValue(component, null); - - if (propertyValue == null && compareValue.GetValue() == null) { - return TaskStatus.Success; - } - - return propertyValue.Equals(compareValue.GetValue()) ? TaskStatus.Success : TaskStatus.Failure; - } - - public override void OnReset() - { - targetGameObject = null; - componentName = null; - propertyName = null; - compareValue = null; - } - } -} \ No newline at end of file diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/Reflection/ComparePropertyValue.cs.meta b/Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/Reflection/ComparePropertyValue.cs.meta deleted file mode 100644 index 59fbef22..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Conditionals/Reflection/ComparePropertyValue.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: f8b0fa403f826a74087ece4b81fec1c7 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: -- cgit v1.1-26-g67d0