From 22891bf59032ba88262824255a706d652031384b Mon Sep 17 00:00:00 2001 From: chai Date: Thu, 10 Mar 2022 14:07:40 +0800 Subject: * move folder --- .../Runtime/Actions/BehaviorTreeReference.cs | 17 ---- .../Runtime/Actions/BehaviorTreeReference.cs.meta | 8 -- .../Behavior Designer/Runtime/Actions/Idle.cs | 15 ---- .../Behavior Designer/Runtime/Actions/Idle.cs.meta | 8 -- .../Behavior Designer/Runtime/Actions/Log.cs | 33 -------- .../Behavior Designer/Runtime/Actions/Log.cs.meta | 7 -- .../Runtime/Actions/PerformInterruption.cs | 29 ------- .../Runtime/Actions/PerformInterruption.cs.meta | 7 -- .../Runtime/Actions/Reflection.meta | 4 - .../Runtime/Actions/Reflection/GetFieldValue.cs | 58 -------------- .../Actions/Reflection/GetFieldValue.cs.meta | 8 -- .../Runtime/Actions/Reflection/GetPropertyValue.cs | 58 -------------- .../Actions/Reflection/GetPropertyValue.cs.meta | 8 -- .../Runtime/Actions/Reflection/InvokeMethod.cs | 86 -------------------- .../Actions/Reflection/InvokeMethod.cs.meta | 8 -- .../Runtime/Actions/Reflection/SetFieldValue.cs | 57 -------------- .../Actions/Reflection/SetFieldValue.cs.meta | 8 -- .../Runtime/Actions/Reflection/SetPropertyValue.cs | 57 -------------- .../Actions/Reflection/SetPropertyValue.cs.meta | 8 -- .../Runtime/Actions/RestartBehaviorTree.cs | 56 ------------- .../Runtime/Actions/RestartBehaviorTree.cs.meta | 8 -- .../Behavior Designer/Runtime/Actions/SendEvent.cs | 73 ----------------- .../Runtime/Actions/SendEvent.cs.meta | 8 -- .../Runtime/Actions/StartBehaviorTree.cs | 92 ---------------------- .../Runtime/Actions/StartBehaviorTree.cs.meta | 7 -- .../Runtime/Actions/StopBehaviorTree.cs | 57 -------------- .../Runtime/Actions/StopBehaviorTree.cs.meta | 7 -- .../Behavior Designer/Runtime/Actions/Wait.cs | 67 ---------------- .../Behavior Designer/Runtime/Actions/Wait.cs.meta | 7 -- 29 files changed, 866 deletions(-) delete mode 100644 Assets/ThirdParty/Behavior Designer/Runtime/Actions/BehaviorTreeReference.cs delete mode 100644 Assets/ThirdParty/Behavior Designer/Runtime/Actions/BehaviorTreeReference.cs.meta delete mode 100644 Assets/ThirdParty/Behavior Designer/Runtime/Actions/Idle.cs delete mode 100644 Assets/ThirdParty/Behavior Designer/Runtime/Actions/Idle.cs.meta delete mode 100644 Assets/ThirdParty/Behavior Designer/Runtime/Actions/Log.cs delete mode 100644 Assets/ThirdParty/Behavior Designer/Runtime/Actions/Log.cs.meta delete mode 100644 Assets/ThirdParty/Behavior Designer/Runtime/Actions/PerformInterruption.cs delete mode 100644 Assets/ThirdParty/Behavior Designer/Runtime/Actions/PerformInterruption.cs.meta delete mode 100644 Assets/ThirdParty/Behavior Designer/Runtime/Actions/Reflection.meta delete mode 100644 Assets/ThirdParty/Behavior Designer/Runtime/Actions/Reflection/GetFieldValue.cs delete mode 100644 Assets/ThirdParty/Behavior Designer/Runtime/Actions/Reflection/GetFieldValue.cs.meta delete mode 100644 Assets/ThirdParty/Behavior Designer/Runtime/Actions/Reflection/GetPropertyValue.cs delete mode 100644 Assets/ThirdParty/Behavior Designer/Runtime/Actions/Reflection/GetPropertyValue.cs.meta delete mode 100644 Assets/ThirdParty/Behavior Designer/Runtime/Actions/Reflection/InvokeMethod.cs delete mode 100644 Assets/ThirdParty/Behavior Designer/Runtime/Actions/Reflection/InvokeMethod.cs.meta delete mode 100644 Assets/ThirdParty/Behavior Designer/Runtime/Actions/Reflection/SetFieldValue.cs delete mode 100644 Assets/ThirdParty/Behavior Designer/Runtime/Actions/Reflection/SetFieldValue.cs.meta delete mode 100644 Assets/ThirdParty/Behavior Designer/Runtime/Actions/Reflection/SetPropertyValue.cs delete mode 100644 Assets/ThirdParty/Behavior Designer/Runtime/Actions/Reflection/SetPropertyValue.cs.meta delete mode 100644 Assets/ThirdParty/Behavior Designer/Runtime/Actions/RestartBehaviorTree.cs delete mode 100644 Assets/ThirdParty/Behavior Designer/Runtime/Actions/RestartBehaviorTree.cs.meta delete mode 100644 Assets/ThirdParty/Behavior Designer/Runtime/Actions/SendEvent.cs delete mode 100644 Assets/ThirdParty/Behavior Designer/Runtime/Actions/SendEvent.cs.meta delete mode 100644 Assets/ThirdParty/Behavior Designer/Runtime/Actions/StartBehaviorTree.cs delete mode 100644 Assets/ThirdParty/Behavior Designer/Runtime/Actions/StartBehaviorTree.cs.meta delete mode 100644 Assets/ThirdParty/Behavior Designer/Runtime/Actions/StopBehaviorTree.cs delete mode 100644 Assets/ThirdParty/Behavior Designer/Runtime/Actions/StopBehaviorTree.cs.meta delete mode 100644 Assets/ThirdParty/Behavior Designer/Runtime/Actions/Wait.cs delete mode 100644 Assets/ThirdParty/Behavior Designer/Runtime/Actions/Wait.cs.meta (limited to 'Assets/ThirdParty/Behavior Designer/Runtime/Actions') diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Actions/BehaviorTreeReference.cs b/Assets/ThirdParty/Behavior Designer/Runtime/Actions/BehaviorTreeReference.cs deleted file mode 100644 index b0611bce..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Actions/BehaviorTreeReference.cs +++ /dev/null @@ -1,17 +0,0 @@ - - -namespace BehaviorDesigner.Runtime.Tasks -{ - // Wrapper class for the Behavior Reference task. The Behavior Tree Reference task allows you to run another behavior tree within the current behavior tree. - // One use for this task is if you have an unit that plays a series of tasks to attack. You may want the unit to attack at different points within - // the behavior tree, and you want that attack to always be the same. Instead of copying and pasting the same tasks over and over you can just use - // an external behavior and then the tasks are always guaranteed to be the same. This example is demonstrated in the RTS sample project located at - // http://www.opsive.com/assets/BehaviorDesigner/samples.php. - [TaskDescription("Behavior Tree Reference allows you to run another behavior tree within the current behavior tree.")] - [HelpURL("http://www.opsive.com/assets/BehaviorDesigner/documentation.php?id=53")] - [TaskIcon("BehaviorTreeReferenceIcon.png")] - public class BehaviorTreeReference : BehaviorReference - { - // intentionally left blank - subclass of BehaviorReference - } -} \ No newline at end of file diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Actions/BehaviorTreeReference.cs.meta b/Assets/ThirdParty/Behavior Designer/Runtime/Actions/BehaviorTreeReference.cs.meta deleted file mode 100644 index f81a791a..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Actions/BehaviorTreeReference.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: af7b6fcbc7258f34aad1bb82b5b3fdc8 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Actions/Idle.cs b/Assets/ThirdParty/Behavior Designer/Runtime/Actions/Idle.cs deleted file mode 100644 index 2cd9f2f4..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Actions/Idle.cs +++ /dev/null @@ -1,15 +0,0 @@ - - -namespace BehaviorDesigner.Runtime.Tasks -{ - [TaskDescription("Returns a TaskStatus of running. Will only stop when interrupted or a conditional abort is triggered.")] - [HelpURL("http://www.opsive.com/assets/BehaviorDesigner/documentation.php?id=112")] - [TaskIcon("{SkinColor}IdleIcon.png")] - public class Idle : Action - { - public override TaskStatus OnUpdate() - { - return TaskStatus.Running; - } - } -} \ No newline at end of file diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Actions/Idle.cs.meta b/Assets/ThirdParty/Behavior Designer/Runtime/Actions/Idle.cs.meta deleted file mode 100644 index 6b5a4977..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Actions/Idle.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 759252a4ffada80419ef06ce1c625246 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Actions/Log.cs b/Assets/ThirdParty/Behavior Designer/Runtime/Actions/Log.cs deleted file mode 100644 index a2363d43..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Actions/Log.cs +++ /dev/null @@ -1,33 +0,0 @@ -using UnityEngine; - -namespace BehaviorDesigner.Runtime.Tasks -{ - [TaskDescription("Log is a simple task which will output the specified text and return success. It can be used for debugging.")] - [HelpURL("http://www.opsive.com/assets/BehaviorDesigner/documentation.php?id=16")] - [TaskIcon("{SkinColor}LogIcon.png")] - public class Log : Action - { - [Tooltip("Text to output to the log")] - public SharedString text; - [Tooltip("Is this text an error?")] - public SharedBool logError; - - public override TaskStatus OnUpdate() - { - // Log the text and return success - if (logError.Value) { - Debug.LogError(text); - } else { - Debug.Log(text); - } - return TaskStatus.Success; - } - - public override void OnReset() - { - // Reset the properties back to their original values - text = ""; - logError = false; - } - } -} \ No newline at end of file diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Actions/Log.cs.meta b/Assets/ThirdParty/Behavior Designer/Runtime/Actions/Log.cs.meta deleted file mode 100644 index 2c0c0b18..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Actions/Log.cs.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: d53794347878c7c479da37533dce2024 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Actions/PerformInterruption.cs b/Assets/ThirdParty/Behavior Designer/Runtime/Actions/PerformInterruption.cs deleted file mode 100644 index 05c20a68..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Actions/PerformInterruption.cs +++ /dev/null @@ -1,29 +0,0 @@ -namespace BehaviorDesigner.Runtime.Tasks -{ - [TaskDescription("Perform the actual interruption. This will immediately stop the specified tasks from running and will return success or failure depending on the value of interrupt success.")] - [HelpURL("http://www.opsive.com/assets/BehaviorDesigner/documentation.php?id=17")] - [TaskIcon("{SkinColor}PerformInterruptionIcon.png")] - public class PerformInterruption : Action - { - [Tooltip("The list of tasks to interrupt. Can be any number of tasks")] - public Interrupt[] interruptTasks; - [Tooltip("When we interrupt the task should we return a task status of success?")] - public SharedBool interruptSuccess; - - public override TaskStatus OnUpdate() - { - // Loop through all of the tasks and fire an interruption. Once complete return success. - for (int i = 0; i < interruptTasks.Length; ++i) { - interruptTasks[i].DoInterrupt(interruptSuccess.Value ? TaskStatus.Success : TaskStatus.Failure); - } - return TaskStatus.Success; - } - - public override void OnReset() - { - // Reset the properties back to their original values. - interruptTasks = null; - interruptSuccess = false; - } - } -} \ No newline at end of file diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Actions/PerformInterruption.cs.meta b/Assets/ThirdParty/Behavior Designer/Runtime/Actions/PerformInterruption.cs.meta deleted file mode 100644 index 773c0f51..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Actions/PerformInterruption.cs.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 72d2d6051b23e86468e2f715f044dad8 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Actions/Reflection.meta b/Assets/ThirdParty/Behavior Designer/Runtime/Actions/Reflection.meta deleted file mode 100644 index b0bb23d7..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Actions/Reflection.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: 70f925868ab5ebe4cbc702810c2c5857 -DefaultImporter: - userData: diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Actions/Reflection/GetFieldValue.cs b/Assets/ThirdParty/Behavior Designer/Runtime/Actions/Reflection/GetFieldValue.cs deleted file mode 100644 index a5b31bc4..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Actions/Reflection/GetFieldValue.cs +++ /dev/null @@ -1,58 +0,0 @@ -using UnityEngine; -using System; -using System.Reflection; - -namespace BehaviorDesigner.Runtime.Tasks -{ - [TaskDescription("Gets the value from the field specified. Returns success if the field was retrieved.")] - [HelpURL("http://www.opsive.com/assets/BehaviorDesigner/documentation.php?id=147")] - [TaskCategory("Reflection")] - [TaskIcon("{SkinColor}ReflectionIcon.png")] - public class GetFieldValue : Action - { - [Tooltip("The GameObject to get the field on")] - public SharedGameObject targetGameObject; - [Tooltip("The component to get the field on")] - public SharedString componentName; - [Tooltip("The name of the field")] - public SharedString fieldName; - [Tooltip("The value of the field")] - [RequiredField] - public SharedVariable fieldValue; - - public override TaskStatus OnUpdate() - { - if (fieldValue == null) { - Debug.LogWarning("Unable to get field - field value is null"); - return TaskStatus.Failure; - } - - var type = TaskUtility.GetTypeWithinAssembly(componentName.Value); - if (type == null) { - Debug.LogWarning("Unable to get field - type is null"); - return TaskStatus.Failure; - } - - var component = GetDefaultGameObject(targetGameObject.Value).GetComponent(type); - if (component == null) { - Debug.LogWarning("Unable to get 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); - fieldValue.SetValue(field.GetValue(component)); - - return TaskStatus.Success; - } - - public override void OnReset() - { - targetGameObject = null; - componentName = null; - fieldName = null; - fieldValue = null; - } - } -} \ No newline at end of file diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Actions/Reflection/GetFieldValue.cs.meta b/Assets/ThirdParty/Behavior Designer/Runtime/Actions/Reflection/GetFieldValue.cs.meta deleted file mode 100644 index 34bf75c3..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Actions/Reflection/GetFieldValue.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: bc317dd7feb2085499edb0d0c4604640 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Actions/Reflection/GetPropertyValue.cs b/Assets/ThirdParty/Behavior Designer/Runtime/Actions/Reflection/GetPropertyValue.cs deleted file mode 100644 index be81eee4..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Actions/Reflection/GetPropertyValue.cs +++ /dev/null @@ -1,58 +0,0 @@ -using UnityEngine; -using System; -using System.Reflection; - -namespace BehaviorDesigner.Runtime.Tasks -{ - [TaskDescription("Gets the value from the property specified. Returns success if the property was retrieved.")] - [HelpURL("http://www.opsive.com/assets/BehaviorDesigner/documentation.php?id=148")] - [TaskCategory("Reflection")] - [TaskIcon("{SkinColor}ReflectionIcon.png")] - public class GetPropertyValue : Action - { - [Tooltip("The GameObject to get the property of")] - public SharedGameObject targetGameObject; - [Tooltip("The component to get the property of")] - public SharedString componentName; - [Tooltip("The name of the property")] - public SharedString propertyName; - [Tooltip("The value of the property")] - [RequiredField] - public SharedVariable propertyValue; - - public override TaskStatus OnUpdate() - { - if (propertyValue == null) { - Debug.LogWarning("Unable to get property - property value is null"); - return TaskStatus.Failure; - } - - var type = TaskUtility.GetTypeWithinAssembly(componentName.Value); - if (type == null) { - Debug.LogWarning("Unable to get property - type is null"); - return TaskStatus.Failure; - } - - var component = GetDefaultGameObject(targetGameObject.Value).GetComponent(type); - if (component == null) { - Debug.LogWarning("Unable to get 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); - propertyValue.SetValue(property.GetValue(component, null)); - - return TaskStatus.Success; - } - - public override void OnReset() - { - targetGameObject = null; - componentName = null; - propertyName = null; - propertyValue = null; - } - } -} \ No newline at end of file diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Actions/Reflection/GetPropertyValue.cs.meta b/Assets/ThirdParty/Behavior Designer/Runtime/Actions/Reflection/GetPropertyValue.cs.meta deleted file mode 100644 index 587385b3..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Actions/Reflection/GetPropertyValue.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: dda9c9b7c6ff2ee4f95a2e208cddae64 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Actions/Reflection/InvokeMethod.cs b/Assets/ThirdParty/Behavior Designer/Runtime/Actions/Reflection/InvokeMethod.cs deleted file mode 100644 index 7c239dbd..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Actions/Reflection/InvokeMethod.cs +++ /dev/null @@ -1,86 +0,0 @@ -using UnityEngine; -using System; -using System.Collections.Generic; -using System.Reflection; - -namespace BehaviorDesigner.Runtime.Tasks -{ - [TaskDescription("Invokes the specified method with the specified parameters. Can optionally store the return value. Returns success if the method was invoked.")] - [HelpURL("http://www.opsive.com/assets/BehaviorDesigner/documentation.php?id=145")] - [TaskCategory("Reflection")] - [TaskIcon("{SkinColor}ReflectionIcon.png")] - public class InvokeMethod : Action - { - [Tooltip("The GameObject to invoke the method on")] - public SharedGameObject targetGameObject; - [Tooltip("The component to invoke the method on")] - public SharedString componentName; - [Tooltip("The name of the method")] - public SharedString methodName; - [Tooltip("The first parameter of the method")] - public SharedVariable parameter1; - [Tooltip("The second parameter of the method")] - public SharedVariable parameter2; - [Tooltip("The third parameter of the method")] - public SharedVariable parameter3; - [Tooltip("The fourth parameter of the method")] - public SharedVariable parameter4; - [Tooltip("Store the result of the invoke call")] - public SharedVariable storeResult; - - public override TaskStatus OnUpdate() - { - var type = TaskUtility.GetTypeWithinAssembly(componentName.Value); - if (type == null) { - Debug.LogWarning("Unable to invoke - type is null"); - return TaskStatus.Failure; - } - - var component = GetDefaultGameObject(targetGameObject.Value).GetComponent(type); - if (component == null) { - Debug.LogWarning("Unable to invoke method with component " + componentName.Value); - return TaskStatus.Failure; - } - - var parameterList = new List(); - var parameterTypeList = new List(); - SharedVariable sharedVariable = null; - for (int i = 0; i < 4; ++i) { - var parameterField = GetType().GetField("parameter" + (i + 1)); - if ((sharedVariable = parameterField.GetValue(this) as SharedVariable) != null) { - parameterList.Add(sharedVariable.GetValue()); - parameterTypeList.Add(sharedVariable.GetType().GetProperty("Value").PropertyType); - } else { - break; - } - } - // 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 methodInfo = component.GetType().GetMethod(methodName.Value, parameterTypeList.ToArray()); - - if (methodInfo == null) { - Debug.LogWarning("Unable to invoke method " + methodName.Value + " on component " + componentName.Value); - return TaskStatus.Failure; - } - - var result = methodInfo.Invoke(component, parameterList.ToArray()); - if (storeResult != null) { - storeResult.SetValue(result); - } - - return TaskStatus.Success; - } - - public override void OnReset() - { - targetGameObject = null; - componentName = null; - methodName = null; - parameter1 = null; - parameter2 = null; - parameter3 = null; - parameter4 = null; - storeResult = null; - } - } -} \ No newline at end of file diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Actions/Reflection/InvokeMethod.cs.meta b/Assets/ThirdParty/Behavior Designer/Runtime/Actions/Reflection/InvokeMethod.cs.meta deleted file mode 100644 index eed4a86a..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Actions/Reflection/InvokeMethod.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 359bd67578f53034ab2eb00e7696d317 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Actions/Reflection/SetFieldValue.cs b/Assets/ThirdParty/Behavior Designer/Runtime/Actions/Reflection/SetFieldValue.cs deleted file mode 100644 index 79675c97..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Actions/Reflection/SetFieldValue.cs +++ /dev/null @@ -1,57 +0,0 @@ -using UnityEngine; -using System; -using System.Reflection; - -namespace BehaviorDesigner.Runtime.Tasks -{ - [TaskDescription("Sets the field to the value specified. Returns success if the field was set.")] - [HelpURL("http://www.opsive.com/assets/BehaviorDesigner/documentation.php?id=149")] - [TaskCategory("Reflection")] - [TaskIcon("{SkinColor}ReflectionIcon.png")] - public class SetFieldValue : Action - { - [Tooltip("The GameObject to set the field on")] - public SharedGameObject targetGameObject; - [Tooltip("The component to set the field on")] - public SharedString componentName; - [Tooltip("The name of the field")] - public SharedString fieldName; - [Tooltip("The value to set")] - public SharedVariable fieldValue; - - public override TaskStatus OnUpdate() - { - if (fieldValue == null) { - Debug.LogWarning("Unable to get field - field value is null"); - return TaskStatus.Failure; - } - - var type = TaskUtility.GetTypeWithinAssembly(componentName.Value); - if (type == null) { - Debug.LogWarning("Unable to set field - type is null"); - return TaskStatus.Failure; - } - - var component = GetDefaultGameObject(targetGameObject.Value).GetComponent(type); - if (component == null) { - Debug.LogWarning("Unable to set 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); - field.SetValue(component, fieldValue.GetValue()); - - return TaskStatus.Success; - } - - public override void OnReset() - { - targetGameObject = null; - componentName = null; - fieldName = null; - fieldValue = null; - } - } -} \ No newline at end of file diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Actions/Reflection/SetFieldValue.cs.meta b/Assets/ThirdParty/Behavior Designer/Runtime/Actions/Reflection/SetFieldValue.cs.meta deleted file mode 100644 index 433a991c..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Actions/Reflection/SetFieldValue.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 21e389787213ba24ab1a6817def634ae -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Actions/Reflection/SetPropertyValue.cs b/Assets/ThirdParty/Behavior Designer/Runtime/Actions/Reflection/SetPropertyValue.cs deleted file mode 100644 index 9ec7cd08..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Actions/Reflection/SetPropertyValue.cs +++ /dev/null @@ -1,57 +0,0 @@ -using UnityEngine; -using System; -using System.Reflection; - -namespace BehaviorDesigner.Runtime.Tasks -{ - [TaskDescription("Sets the property to the value specified. Returns success if the property was set.")] - [HelpURL("http://www.opsive.com/assets/BehaviorDesigner/documentation.php?id=150")] - [TaskCategory("Reflection")] - [TaskIcon("{SkinColor}ReflectionIcon.png")] - public class SetPropertyValue : Action - { - [Tooltip("The GameObject to set the property on")] - public SharedGameObject targetGameObject; - [Tooltip("The component to set the property on")] - public SharedString componentName; - [Tooltip("The name of the property")] - public SharedString propertyName; - [Tooltip("The value to set")] - public SharedVariable propertyValue; - - public override TaskStatus OnUpdate() - { - if (propertyValue == null) { - Debug.LogWarning("Unable to get field - field value is null"); - return TaskStatus.Failure; - } - - var type = TaskUtility.GetTypeWithinAssembly(componentName.Value); - if (type == null) { - Debug.LogWarning("Unable to set property - type is null"); - return TaskStatus.Failure; - } - - var component = GetDefaultGameObject(targetGameObject.Value).GetComponent(type); - if (component == null) { - Debug.LogWarning("Unable to set 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); - property.SetValue(component, propertyValue.GetValue(), null); - - return TaskStatus.Success; - } - - public override void OnReset() - { - targetGameObject = null; - componentName = null; - propertyName = null; - propertyValue = null; - } - } -} \ No newline at end of file diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Actions/Reflection/SetPropertyValue.cs.meta b/Assets/ThirdParty/Behavior Designer/Runtime/Actions/Reflection/SetPropertyValue.cs.meta deleted file mode 100644 index 012823b6..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Actions/Reflection/SetPropertyValue.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: d98b13b7ae4b36b4092b439731466d9b -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Actions/RestartBehaviorTree.cs b/Assets/ThirdParty/Behavior Designer/Runtime/Actions/RestartBehaviorTree.cs deleted file mode 100644 index a63d9e6c..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Actions/RestartBehaviorTree.cs +++ /dev/null @@ -1,56 +0,0 @@ -using UnityEngine; - -namespace BehaviorDesigner.Runtime.Tasks -{ - [TaskDescription("Restarts a behavior tree, returns success after it has been restarted.")] - [HelpURL("http://www.opsive.com/assets/BehaviorDesigner/documentation.php?id=66")] - [TaskIcon("{SkinColor}RestartBehaviorTreeIcon.png")] - public class RestartBehaviorTree : Action - { - [Tooltip("The GameObject of the behavior tree that should be restarted. If null use the current behavior")] - public SharedGameObject behaviorGameObject; - [Tooltip("The group of the behavior tree that should be restarted")] - public SharedInt group; - - private Behavior behavior; - - public override void OnAwake() - { - var behaviorTrees = GetDefaultGameObject(behaviorGameObject.Value).GetComponents(); - if (behaviorTrees.Length == 1) { - behavior = behaviorTrees[0]; - } else if (behaviorTrees.Length > 1) { - for (int i = 0; i < behaviorTrees.Length; ++i) { - if (behaviorTrees[i].Group == group.Value) { - behavior = behaviorTrees[i]; - break; - } - } - // If the group can't be found then use the first behavior tree - if (behavior == null) { - behavior = behaviorTrees[0]; - } - } - } - - public override TaskStatus OnUpdate() - { - if (behavior == null) { - return TaskStatus.Failure; - } - - // Stop the behavior tree - behavior.DisableBehavior(); - // Start the behavior tree back up - behavior.EnableBehavior(); - // Return success - return TaskStatus.Success; - } - - public override void OnReset() - { - // Reset the properties back to their original values. - behavior = null; - } - } -} \ No newline at end of file diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Actions/RestartBehaviorTree.cs.meta b/Assets/ThirdParty/Behavior Designer/Runtime/Actions/RestartBehaviorTree.cs.meta deleted file mode 100644 index d1110668..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Actions/RestartBehaviorTree.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 2765e7ece98046542880a1249b87e096 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Actions/SendEvent.cs b/Assets/ThirdParty/Behavior Designer/Runtime/Actions/SendEvent.cs deleted file mode 100644 index 76007309..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Actions/SendEvent.cs +++ /dev/null @@ -1,73 +0,0 @@ -using UnityEngine; - -namespace BehaviorDesigner.Runtime.Tasks -{ - [TaskDescription("Sends an event to the behavior tree, returns success after sending the event.")] - [HelpURL("http://www.opsive.com/assets/BehaviorDesigner/documentation.php?id=121")] - [TaskIcon("{SkinColor}SendEventIcon.png")] - public class SendEvent : Action - { - [Tooltip("The GameObject of the behavior tree that should have the event sent to it. If null use the current behavior")] - public SharedGameObject targetGameObject; - [Tooltip("The event to send")] - public SharedString eventName; - [Tooltip("The group of the behavior tree that the event should be sent to")] - public SharedInt group; - [Tooltip("Optionally specify a first argument to send")] - [SharedRequired] - public SharedVariable argument1; - [Tooltip("Optionally specify a second argument to send")] - [SharedRequired] - public SharedVariable argument2; - [Tooltip("Optionally specify a third argument to send")] - [SharedRequired] - public SharedVariable argument3; - - private BehaviorTree behaviorTree; - - public override void OnStart() - { - var behaviorTrees = GetDefaultGameObject(targetGameObject.Value).GetComponents(); - if (behaviorTrees.Length == 1) { - behaviorTree = behaviorTrees[0]; - } else if (behaviorTrees.Length > 1) { - for (int i = 0; i < behaviorTrees.Length; ++i) { - if (behaviorTrees[i].Group == group.Value) { - behaviorTree = behaviorTrees[i]; - break; - } - } - // If the group can't be found then use the first behavior tree - if (behaviorTree == null) { - behaviorTree = behaviorTrees[0]; - } - } - } - - public override TaskStatus OnUpdate() - { - // Send the event and return success - if (argument1 == null || argument1.IsNone) { - behaviorTree.SendEvent(eventName.Value); - } else { - if (argument2 == null || argument2.IsNone) { - behaviorTree.SendEvent(eventName.Value, argument1.GetValue()); - } else { - if (argument3 == null || argument3.IsNone) { - behaviorTree.SendEvent(eventName.Value, argument1.GetValue(), argument2.GetValue()); - } else { - behaviorTree.SendEvent(eventName.Value, argument1.GetValue(), argument2.GetValue(), argument3.GetValue()); - } - } - } - return TaskStatus.Success; - } - - public override void OnReset() - { - // Reset the properties back to their original values - targetGameObject = null; - eventName = ""; - } - } -} \ No newline at end of file diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Actions/SendEvent.cs.meta b/Assets/ThirdParty/Behavior Designer/Runtime/Actions/SendEvent.cs.meta deleted file mode 100644 index 82bd42cd..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Actions/SendEvent.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 53b90428a37913c40b6d415ced4e12f9 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Actions/StartBehaviorTree.cs b/Assets/ThirdParty/Behavior Designer/Runtime/Actions/StartBehaviorTree.cs deleted file mode 100644 index 4bc5ebee..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Actions/StartBehaviorTree.cs +++ /dev/null @@ -1,92 +0,0 @@ -using UnityEngine; - -namespace BehaviorDesigner.Runtime.Tasks -{ - [TaskDescription("Start a new behavior tree and return success after it has been started.")] - [HelpURL("http://www.opsive.com/assets/BehaviorDesigner/documentation.php?id=20")] - [TaskIcon("{SkinColor}StartBehaviorTreeIcon.png")] - public class StartBehaviorTree : Action - { - [Tooltip("The GameObject of the behavior tree that should be started. If null use the current behavior")] - public SharedGameObject behaviorGameObject; - [Tooltip("The group of the behavior tree that should be started")] - public SharedInt group; - [Tooltip("Should this task wait for the behavior tree to complete?")] - public SharedBool waitForCompletion = false; - [Tooltip("Should the variables be synchronized?")] - public SharedBool synchronizeVariables; - - private bool behaviorComplete; - private Behavior behavior; - - public override void OnStart() - { - var behaviorTrees = GetDefaultGameObject(behaviorGameObject.Value).GetComponents(); - if (behaviorTrees.Length == 1) { - behavior = behaviorTrees[0]; - } else if (behaviorTrees.Length > 1) { - for (int i = 0; i < behaviorTrees.Length; ++i) { - if (behaviorTrees[i].Group == group.Value) { - behavior = behaviorTrees[i]; - break; - } - } - // If the group can't be found then use the first behavior tree - if (behavior == null) { - behavior = behaviorTrees[0]; - } - } - - if (behavior != null) { - var variables = Owner.GetAllVariables(); - if (variables != null && synchronizeVariables.Value) { - for (int i = 0; i < variables.Count; ++i) { - behavior.SetVariableValue(variables[i].Name, variables[i]); - } - } - - behavior.EnableBehavior(); - - if (waitForCompletion.Value) { - behaviorComplete = false; - behavior.OnBehaviorEnd += BehaviorEnded; - } - } - } - - public override TaskStatus OnUpdate() - { - if (behavior == null) { - return TaskStatus.Failure; - } - - // Return a status of running if we are waiting for the behavior tree to end and it hasn't ended yet - if (waitForCompletion.Value && !behaviorComplete) { - return TaskStatus.Running; - } - - return TaskStatus.Success; - } - - private void BehaviorEnded(Behavior behavior) - { - behaviorComplete = true; - } - - public override void OnEnd() - { - if (behavior != null && waitForCompletion.Value) { - behavior.OnBehaviorEnd -= BehaviorEnded; - } - } - - public override void OnReset() - { - // Reset the properties back to their original values. - behaviorGameObject = null; - group = 0; - waitForCompletion = false; - synchronizeVariables = false; - } - } -} \ No newline at end of file diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Actions/StartBehaviorTree.cs.meta b/Assets/ThirdParty/Behavior Designer/Runtime/Actions/StartBehaviorTree.cs.meta deleted file mode 100644 index 31dfed3f..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Actions/StartBehaviorTree.cs.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: bc3d67c80371297439385b30f4be506c -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Actions/StopBehaviorTree.cs b/Assets/ThirdParty/Behavior Designer/Runtime/Actions/StopBehaviorTree.cs deleted file mode 100644 index fe753c5b..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Actions/StopBehaviorTree.cs +++ /dev/null @@ -1,57 +0,0 @@ -using UnityEngine; - -namespace BehaviorDesigner.Runtime.Tasks -{ - [TaskDescription("Pause or disable a behavior tree and return success after it has been stopped.")] - [HelpURL("http://www.opsive.com/assets/BehaviorDesigner/documentation.php?id=21")] - [TaskIcon("{SkinColor}StopBehaviorTreeIcon.png")] - public class StopBehaviorTree : Action - { - [Tooltip("The GameObject of the behavior tree that should be stopped. If null use the current behavior")] - public SharedGameObject behaviorGameObject; - [Tooltip("The group of the behavior tree that should be stopped")] - public SharedInt group; - [Tooltip("Should the behavior be paused or completely disabled")] - public SharedBool pauseBehavior = false; - - private Behavior behavior; - - public override void OnStart() - { - var behaviorTrees = GetDefaultGameObject(behaviorGameObject.Value).GetComponents(); - if (behaviorTrees.Length == 1) { - behavior = behaviorTrees[0]; - } else if (behaviorTrees.Length > 1) { - for (int i = 0; i < behaviorTrees.Length; ++i) { - if (behaviorTrees[i].Group == group.Value) { - behavior = behaviorTrees[i]; - break; - } - } - // If the group can't be found then use the first behavior tree - if (behavior == null) { - behavior = behaviorTrees[0]; - } - } - } - - public override TaskStatus OnUpdate() - { - if (behavior == null) { - return TaskStatus.Failure; - } - - // Start the behavior and return success. - behavior.DisableBehavior(pauseBehavior.Value); - return TaskStatus.Success; - } - - public override void OnReset() - { - // Reset the properties back to their original values - behaviorGameObject = null; - group = 0; - pauseBehavior = false; - } - } -} \ No newline at end of file diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Actions/StopBehaviorTree.cs.meta b/Assets/ThirdParty/Behavior Designer/Runtime/Actions/StopBehaviorTree.cs.meta deleted file mode 100644 index 3e6fe6c7..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Actions/StopBehaviorTree.cs.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 130afc7e6aa6e0c4aba29097334aa66b -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Actions/Wait.cs b/Assets/ThirdParty/Behavior Designer/Runtime/Actions/Wait.cs deleted file mode 100644 index 41f77a21..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Actions/Wait.cs +++ /dev/null @@ -1,67 +0,0 @@ -using UnityEngine; - -namespace BehaviorDesigner.Runtime.Tasks -{ - [TaskDescription("Wait a specified amount of time. The task will return running until the task is done waiting. It will return success after the wait time has elapsed.")] - [HelpURL("http://www.opsive.com/assets/BehaviorDesigner/documentation.php?id=22")] - [TaskIcon("{SkinColor}WaitIcon.png")] - public class Wait : Action - { - [Tooltip("The amount of time to wait")] - public SharedFloat waitTime = 1; - [Tooltip("Should the wait be randomized?")] - public SharedBool randomWait = false; - [Tooltip("The minimum wait time if random wait is enabled")] - public SharedFloat randomWaitMin = 1; - [Tooltip("The maximum wait time if random wait is enabled")] - public SharedFloat randomWaitMax = 1; - - // The time to wait - private float waitDuration; - // The time that the task started to wait. - private float startTime; - // Remember the time that the task is paused so the time paused doesn't contribute to the wait time. - private float pauseTime; - - public override void OnStart() - { - // Remember the start time. - startTime = Time.time; - if (randomWait.Value) { - waitDuration = Random.Range(randomWaitMin.Value, randomWaitMax.Value); - } else { - waitDuration = waitTime.Value; - } - } - - public override TaskStatus OnUpdate() - { - // The task is done waiting if the time waitDuration has elapsed since the task was started. - if (startTime + waitDuration < Time.time) { - return TaskStatus.Success; - } - // Otherwise we are still waiting. - return TaskStatus.Running; - } - - public override void OnPause(bool paused) - { - if (paused) { - // Remember the time that the behavior was paused. - pauseTime = Time.time; - } else { - // Add the difference between Time.time and pauseTime to figure out a new start time. - startTime += (Time.time - pauseTime); - } - } - - public override void OnReset() - { - // Reset the public properties back to their original values - waitTime = 1; - randomWait = false; - randomWaitMin = 1; - randomWaitMax = 1; - } - } -} \ No newline at end of file diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Actions/Wait.cs.meta b/Assets/ThirdParty/Behavior Designer/Runtime/Actions/Wait.cs.meta deleted file mode 100644 index e7138e51..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Actions/Wait.cs.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 67824d2e00531d84db9973773e4426e9 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} -- cgit v1.1-26-g67d0