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/Animation | |
parent | 8b04ea73e540067f83870b61d89db4868fea5e8a (diff) |
* move folder
Diffstat (limited to 'Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Animation')
24 files changed, 0 insertions, 677 deletions
diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Animation/Blend.cs b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Animation/Blend.cs deleted file mode 100644 index c37744a1..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Animation/Blend.cs +++ /dev/null @@ -1,51 +0,0 @@ -using UnityEngine;
-
-namespace BehaviorDesigner.Runtime.Tasks.Basic.UnityAnimation
-{
- [TaskCategory("Basic/Animation")]
- [TaskDescription("Blends the animation. Returns Success.")]
- public class Blend : Action
- {
- [Tooltip("The GameObject that the task operates on. If null the task GameObject is used.")]
- public SharedGameObject targetGameObject;
- [Tooltip("The name of the animation")]
- public SharedString animationName;
- [Tooltip("The weight the animation should blend to")]
- public float targetWeight = 1;
- [Tooltip("The amount of time it takes to blend")]
- public float fadeLength = 0.3f;
-
- // cache the animation component
- private Animation animation;
- private GameObject prevGameObject;
-
- public override void OnStart()
- {
- var currentGameObject = GetDefaultGameObject(targetGameObject.Value);
- if (currentGameObject != prevGameObject) {
- animation = currentGameObject.GetComponent<Animation>();
- prevGameObject = currentGameObject;
- }
- }
-
- public override TaskStatus OnUpdate()
- {
- if (animation == null) {
- Debug.LogWarning("Animation is null");
- return TaskStatus.Failure;
- }
-
- animation.Blend(animationName.Value, targetWeight, fadeLength);
-
- return TaskStatus.Success;
- }
-
- public override void OnReset()
- {
- targetGameObject = null;
- animationName = "";
- targetWeight = 1;
- fadeLength = 0.3f;
- }
- }
-}
\ No newline at end of file diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Animation/Blend.cs.meta b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Animation/Blend.cs.meta deleted file mode 100644 index 191ac404..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Animation/Blend.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2
-guid: dc0640154eb6b674e89f4a2ec1632696
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Animation/CrossFade.cs b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Animation/CrossFade.cs deleted file mode 100644 index 38fcc324..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Animation/CrossFade.cs +++ /dev/null @@ -1,51 +0,0 @@ -using UnityEngine;
-
-namespace BehaviorDesigner.Runtime.Tasks.Basic.UnityAnimation
-{
- [TaskCategory("Basic/Animation")]
- [TaskDescription("Fades the animation over a period of time and fades other animations out. Returns Success.")]
- public class CrossFade : Action
- {
- [Tooltip("The GameObject that the task operates on. If null the task GameObject is used.")]
- public SharedGameObject targetGameObject;
- [Tooltip("The name of the animation")]
- public SharedString animationName;
- [Tooltip("The amount of time it takes to blend")]
- public float fadeLength = 0.3f;
- [Tooltip("The play mode of the animation")]
- public PlayMode playMode = PlayMode.StopSameLayer;
-
- // cache the animation component
- private Animation animation;
- private GameObject prevGameObject;
-
- public override void OnStart()
- {
- var currentGameObject = GetDefaultGameObject(targetGameObject.Value);
- if (currentGameObject != prevGameObject) {
- animation = currentGameObject.GetComponent<Animation>();
- prevGameObject = currentGameObject;
- }
- }
-
- public override TaskStatus OnUpdate()
- {
- if (animation == null) {
- Debug.LogWarning("Animation is null");
- return TaskStatus.Failure;
- }
-
- animation.CrossFade(animationName.Value, fadeLength, playMode);
-
- return TaskStatus.Success;
- }
-
- public override void OnReset()
- {
- targetGameObject = null;
- animationName.Value = "";
- fadeLength = 0.3f;
- playMode = PlayMode.StopSameLayer;
- }
- }
-}
\ No newline at end of file diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Animation/CrossFade.cs.meta b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Animation/CrossFade.cs.meta deleted file mode 100644 index dd091e17..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Animation/CrossFade.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2
-guid: 57d9d1509d13e454caae6f3219c83cc7
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Animation/CrossFadeQueued.cs b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Animation/CrossFadeQueued.cs deleted file mode 100644 index 4c2e9c89..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Animation/CrossFadeQueued.cs +++ /dev/null @@ -1,54 +0,0 @@ -using UnityEngine;
-
-namespace BehaviorDesigner.Runtime.Tasks.Basic.UnityAnimation
-{
- [TaskCategory("Basic/Animation")]
- [TaskDescription("Cross fades an animation after previous animations has finished playing. Returns Success.")]
- public class CrossFadeQueued : Action
- {
- [Tooltip("The GameObject that the task operates on. If null the task GameObject is used.")]
- public SharedGameObject targetGameObject;
- [Tooltip("The name of the animation")]
- public SharedString animationName;
- [Tooltip("The amount of time it takes to blend")]
- public float fadeLength = 0.3f;
- [Tooltip("Specifies when the animation should start playing")]
- public QueueMode queue = QueueMode.CompleteOthers;
- [Tooltip("The play mode of the animation")]
- public PlayMode playMode = PlayMode.StopSameLayer;
-
- // cache the animation component
- private Animation animation;
- private GameObject prevGameObject;
-
- public override void OnStart()
- {
- var currentGameObject = GetDefaultGameObject(targetGameObject.Value);
- if (currentGameObject != prevGameObject) {
- animation = currentGameObject.GetComponent<Animation>();
- prevGameObject = currentGameObject;
- }
- }
-
- public override TaskStatus OnUpdate()
- {
- if (animation == null) {
- Debug.LogWarning("Animation is null");
- return TaskStatus.Failure;
- }
-
- animation.CrossFadeQueued(animationName.Value, fadeLength, queue, playMode);
-
- return TaskStatus.Success;
- }
-
- public override void OnReset()
- {
- targetGameObject = null;
- animationName.Value = "";
- fadeLength = 0.3f;
- queue = QueueMode.CompleteOthers;
- playMode = PlayMode.StopSameLayer;
- }
- }
-}
\ No newline at end of file diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Animation/CrossFadeQueued.cs.meta b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Animation/CrossFadeQueued.cs.meta deleted file mode 100644 index fda00b91..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Animation/CrossFadeQueued.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2
-guid: c1cc2a160ee1978488696564200b3c25
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Animation/GetAnimatePhysics.cs b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Animation/GetAnimatePhysics.cs deleted file mode 100644 index 5f0d49de..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Animation/GetAnimatePhysics.cs +++ /dev/null @@ -1,46 +0,0 @@ -using UnityEngine;
-
-namespace BehaviorDesigner.Runtime.Tasks.Basic.UnityAnimation
-{
- [TaskCategory("Basic/Animation")]
- [TaskDescription("Stores the animate physics value. Returns Success.")]
- public class GetAnimatePhysics : Action
- {
- [Tooltip("The GameObject that the task operates on. If null the task GameObject is used.")]
- public SharedGameObject targetGameObject;
- [Tooltip("Are the if animations are executed in the physics loop?")]
- [RequiredField]
- public SharedBool storeValue;
-
- // cache the animation component
- private Animation animation;
- private GameObject prevGameObject;
-
- public override void OnStart()
- {
- var currentGameObject = GetDefaultGameObject(targetGameObject.Value);
- if (currentGameObject != prevGameObject) {
- animation = currentGameObject.GetComponent<Animation>();
- prevGameObject = currentGameObject;
- }
- }
-
- public override TaskStatus OnUpdate()
- {
- if (animation == null) {
- Debug.LogWarning("Animation is null");
- return TaskStatus.Failure;
- }
-
- storeValue.Value = animation.animatePhysics;
-
- return TaskStatus.Success;
- }
-
- public override void OnReset()
- {
- targetGameObject = null;
- storeValue.Value = false;
- }
- }
-}
\ No newline at end of file diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Animation/GetAnimatePhysics.cs.meta b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Animation/GetAnimatePhysics.cs.meta deleted file mode 100644 index 4bb05d26..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Animation/GetAnimatePhysics.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2
-guid: b5bd2b0ed07f42142934568bd6813619
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Animation/IsPlaying.cs b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Animation/IsPlaying.cs deleted file mode 100644 index f86a854b..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Animation/IsPlaying.cs +++ /dev/null @@ -1,47 +0,0 @@ -using UnityEngine;
-
-namespace BehaviorDesigner.Runtime.Tasks.Basic.UnityAnimation
-{
- [TaskCategory("Basic/Animation")]
- [TaskDescription("Returns Success if the animation is currently playing.")]
- public class IsPlaying : Conditional
- {
- [Tooltip("The GameObject that the task operates on. If null the task GameObject is used.")]
- public SharedGameObject targetGameObject;
- [Tooltip("The name of the animation")]
- public SharedString animationName;
-
- // cache the animation component
- private Animation animation;
- private GameObject prevGameObject;
-
- public override void OnStart()
- {
- var currentGameObject = GetDefaultGameObject(targetGameObject.Value);
- if (currentGameObject != prevGameObject) {
- animation = currentGameObject.GetComponent<Animation>();
- prevGameObject = currentGameObject;
- }
- }
-
- public override TaskStatus OnUpdate()
- {
- if (animation == null) {
- Debug.LogWarning("Animation is null");
- return TaskStatus.Failure;
- }
-
- if (string.IsNullOrEmpty(animationName.Value)) {
- return animation.isPlaying ? TaskStatus.Success : TaskStatus.Failure;
- } else {
- return animation.IsPlaying(animationName.Value) ? TaskStatus.Success : TaskStatus.Failure;
- }
- }
-
- public override void OnReset()
- {
- targetGameObject = null;
- animationName.Value = "";
- }
- }
-}
\ No newline at end of file diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Animation/IsPlaying.cs.meta b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Animation/IsPlaying.cs.meta deleted file mode 100644 index ac35dc24..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Animation/IsPlaying.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2
-guid: ce80475167d230d4181baa69071465ff
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Animation/Play.cs b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Animation/Play.cs deleted file mode 100644 index 4661c83d..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Animation/Play.cs +++ /dev/null @@ -1,52 +0,0 @@ -using UnityEngine;
-
-namespace BehaviorDesigner.Runtime.Tasks.Basic.UnityAnimation
-{
- [TaskCategory("Basic/Animation")]
- [TaskDescription("Plays animation without any blending. Returns Success.")]
- public class Play : Action
- {
- [Tooltip("The GameObject that the task operates on. If null the task GameObject is used.")]
- public SharedGameObject targetGameObject;
- [Tooltip("The name of the animation")]
- public SharedString animationName;
- [Tooltip("The play mode of the animation")]
- public PlayMode playMode = PlayMode.StopSameLayer;
-
- // cache the animation component
- private Animation animation;
- private GameObject prevGameObject;
-
- public override void OnStart()
- {
- var currentGameObject = GetDefaultGameObject(targetGameObject.Value);
- if (currentGameObject != prevGameObject) {
- animation = currentGameObject.GetComponent<Animation>();
- prevGameObject = currentGameObject;
- }
- }
-
- public override TaskStatus OnUpdate()
- {
- if (animation == null) {
- Debug.LogWarning("Animation is null");
- return TaskStatus.Failure;
- }
-
- if (string.IsNullOrEmpty(animationName.Value)) {
- animation.Play();
- } else {
- animation.Play(animationName.Value, playMode);
- }
-
- return TaskStatus.Success;
- }
-
- public override void OnReset()
- {
- targetGameObject = null;
- animationName.Value = "";
- playMode = PlayMode.StopSameLayer;
- }
- }
-}
\ No newline at end of file diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Animation/Play.cs.meta b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Animation/Play.cs.meta deleted file mode 100644 index b89dbdf0..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Animation/Play.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2
-guid: 0b1bf3b05e79dcc468cf71b63d54a4cd
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Animation/PlayQueued.cs b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Animation/PlayQueued.cs deleted file mode 100644 index 7be1b507..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Animation/PlayQueued.cs +++ /dev/null @@ -1,51 +0,0 @@ -using UnityEngine;
-
-namespace BehaviorDesigner.Runtime.Tasks.Basic.UnityAnimation
-{
- [TaskCategory("Basic/Animation")]
- [TaskDescription("Plays an animation after previous animations has finished playing. Returns Success.")]
- public class PlayQueued : Action
- {
- [Tooltip("The GameObject that the task operates on. If null the task GameObject is used.")]
- public SharedGameObject targetGameObject;
- [Tooltip("The name of the animation")]
- public SharedString animationName;
- [Tooltip("Specifies when the animation should start playing")]
- public QueueMode queue = QueueMode.CompleteOthers;
- [Tooltip("The play mode of the animation")]
- public PlayMode playMode = PlayMode.StopSameLayer;
-
- // cache the animation component
- private Animation animation;
- private GameObject prevGameObject;
-
- public override void OnStart()
- {
- var currentGameObject = GetDefaultGameObject(targetGameObject.Value);
- if (currentGameObject != prevGameObject) {
- animation = currentGameObject.GetComponent<Animation>();
- prevGameObject = currentGameObject;
- }
- }
-
- public override TaskStatus OnUpdate()
- {
- if (animation == null) {
- Debug.LogWarning("Animation is null");
- return TaskStatus.Failure;
- }
-
- animation.PlayQueued(animationName.Value, queue, playMode);
-
- return TaskStatus.Success;
- }
-
- public override void OnReset()
- {
- targetGameObject = null;
- animationName.Value = "";
- queue = QueueMode.CompleteOthers;
- playMode = PlayMode.StopSameLayer;
- }
- }
-}
\ No newline at end of file diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Animation/PlayQueued.cs.meta b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Animation/PlayQueued.cs.meta deleted file mode 100644 index 5a578270..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Animation/PlayQueued.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2
-guid: bb55ee97bf8cb3d479de025d77a9c4b6
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Animation/Rewind.cs b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Animation/Rewind.cs deleted file mode 100644 index c8bc35b5..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Animation/Rewind.cs +++ /dev/null @@ -1,49 +0,0 @@ -using UnityEngine;
-
-namespace BehaviorDesigner.Runtime.Tasks.Basic.UnityAnimation
-{
- [TaskCategory("Basic/Animation")]
- [TaskDescription("Rewinds an animation. Rewinds all animations if animationName is blank. Returns Success.")]
- public class Rewind : Action
- {
- [Tooltip("The GameObject that the task operates on. If null the task GameObject is used.")]
- public SharedGameObject targetGameObject;
- [Tooltip("The name of the animation")]
- public SharedString animationName;
-
- // cache the animation component
- private Animation animation;
- private GameObject prevGameObject;
-
- public override void OnStart()
- {
- var currentGameObject = GetDefaultGameObject(targetGameObject.Value);
- if (currentGameObject != prevGameObject) {
- animation = currentGameObject.GetComponent<Animation>();
- prevGameObject = currentGameObject;
- }
- }
-
- public override TaskStatus OnUpdate()
- {
- if (animation == null) {
- Debug.LogWarning("Animation is null");
- return TaskStatus.Failure;
- }
-
- if (string.IsNullOrEmpty(animationName.Value)) {
- animation.Rewind();
- } else {
- animation.Rewind(animationName.Value);
- }
-
- return TaskStatus.Success;
- }
-
- public override void OnReset()
- {
- targetGameObject = null;
- animationName.Value = "";
- }
- }
-}
\ No newline at end of file diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Animation/Rewind.cs.meta b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Animation/Rewind.cs.meta deleted file mode 100644 index 29a969f7..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Animation/Rewind.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2
-guid: 364beb9f6996556449b9f3e03db75290
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Animation/Sample.cs b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Animation/Sample.cs deleted file mode 100644 index 3620122c..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Animation/Sample.cs +++ /dev/null @@ -1,41 +0,0 @@ -using UnityEngine;
-
-namespace BehaviorDesigner.Runtime.Tasks.Basic.UnityAnimation
-{
- [TaskCategory("Basic/Animation")]
- [TaskDescription("Samples animations at the current state. Returns Success.")]
- public class Sample : Action
- {
- [Tooltip("The GameObject that the task operates on. If null the task GameObject is used.")]
- public SharedGameObject targetGameObject;
- // cache the animation component
- private Animation animation;
- private GameObject prevGameObject;
-
- public override void OnStart()
- {
- var currentGameObject = GetDefaultGameObject(targetGameObject.Value);
- if (currentGameObject != prevGameObject) {
- animation = currentGameObject.GetComponent<Animation>();
- prevGameObject = currentGameObject;
- }
- }
-
- public override TaskStatus OnUpdate()
- {
- if (animation == null) {
- Debug.LogWarning("Animation is null");
- return TaskStatus.Failure;
- }
-
- animation.Sample();
-
- return TaskStatus.Success;
- }
-
- public override void OnReset()
- {
- targetGameObject = null;
- }
- }
-}
\ No newline at end of file diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Animation/Sample.cs.meta b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Animation/Sample.cs.meta deleted file mode 100644 index ebb26237..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Animation/Sample.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2
-guid: 2cc64c997b5d6e640af8cc9bd7cf1b5d
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Animation/SetAnimatePhysics.cs b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Animation/SetAnimatePhysics.cs deleted file mode 100644 index 14bdac19..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Animation/SetAnimatePhysics.cs +++ /dev/null @@ -1,45 +0,0 @@ -using UnityEngine;
-
-namespace BehaviorDesigner.Runtime.Tasks.Basic.UnityAnimation
-{
- [TaskCategory("Basic/Animation")]
- [TaskDescription("Sets animate physics to the specified value. Returns Success.")]
- public class SetAnimatePhysics : Action
- {
- [Tooltip("The GameObject that the task operates on. If null the task GameObject is used.")]
- public SharedGameObject targetGameObject;
- [Tooltip("Are animations executed in the physics loop?")]
- public SharedBool animatePhysics;
-
- // cache the animation component
- private Animation animation;
- private GameObject prevGameObject;
-
- public override void OnStart()
- {
- var currentGameObject = GetDefaultGameObject(targetGameObject.Value);
- if (currentGameObject != prevGameObject) {
- animation = currentGameObject.GetComponent<Animation>();
- prevGameObject = currentGameObject;
- }
- }
-
- public override TaskStatus OnUpdate()
- {
- if (animation == null) {
- Debug.LogWarning("Animation is null");
- return TaskStatus.Failure;
- }
-
- animation.animatePhysics = animatePhysics.Value;
-
- return TaskStatus.Success;
- }
-
- public override void OnReset()
- {
- targetGameObject = null;
- animatePhysics.Value = false;
- }
- }
-}
\ No newline at end of file diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Animation/SetAnimatePhysics.cs.meta b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Animation/SetAnimatePhysics.cs.meta deleted file mode 100644 index dda3f075..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Animation/SetAnimatePhysics.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2
-guid: f93fd0c7638add0468744d4f7249c1a7
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Animation/SetWrapMode.cs b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Animation/SetWrapMode.cs deleted file mode 100644 index 4194b81e..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Animation/SetWrapMode.cs +++ /dev/null @@ -1,45 +0,0 @@ -using UnityEngine;
-
-namespace BehaviorDesigner.Runtime.Tasks.Basic.UnityAnimation
-{
- [TaskCategory("Basic/Animation")]
- [TaskDescription("Sets the wrap mode to the specified value. Returns Success.")]
- public class SetWrapMode : Action
- {
- [Tooltip("The GameObject that the task operates on. If null the task GameObject is used.")]
- public SharedGameObject targetGameObject;
- [Tooltip("How should time beyond the playback range of the clip be treated?")]
- public WrapMode wrapMode = WrapMode.Default;
-
- // cache the animation component
- private Animation animation;
- private GameObject prevGameObject;
-
- public override void OnStart()
- {
- var currentGameObject = GetDefaultGameObject(targetGameObject.Value);
- if (currentGameObject != prevGameObject) {
- animation = currentGameObject.GetComponent<Animation>();
- prevGameObject = currentGameObject;
- }
- }
-
- public override TaskStatus OnUpdate()
- {
- if (animation == null) {
- Debug.LogWarning("Animation is null");
- return TaskStatus.Failure;
- }
-
- animation.wrapMode = wrapMode;
-
- return TaskStatus.Success;
- }
-
- public override void OnReset()
- {
- targetGameObject = null;
- wrapMode = WrapMode.Default;
- }
- }
-}
\ No newline at end of file diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Animation/SetWrapMode.cs.meta b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Animation/SetWrapMode.cs.meta deleted file mode 100644 index 7b815d1d..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Animation/SetWrapMode.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2
-guid: 39af69a1e220fc2419a5d34933029ff9
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Animation/Stop.cs b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Animation/Stop.cs deleted file mode 100644 index 8625b0bd..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Animation/Stop.cs +++ /dev/null @@ -1,49 +0,0 @@ -using UnityEngine;
-
-namespace BehaviorDesigner.Runtime.Tasks.Basic.UnityAnimation
-{
- [TaskCategory("Basic/Animation")]
- [TaskDescription("Stops an animation. Stops all animations if animationName is blank. Returns Success.")]
- public class Stop : Action
- {
- [Tooltip("The GameObject that the task operates on. If null the task GameObject is used.")]
- public SharedGameObject targetGameObject;
- [Tooltip("The name of the animation")]
- public SharedString animationName;
-
- // cache the animation component
- private Animation animation;
- private GameObject prevGameObject;
-
- public override void OnStart()
- {
- var currentGameObject = GetDefaultGameObject(targetGameObject.Value);
- if (currentGameObject != prevGameObject) {
- animation = currentGameObject.GetComponent<Animation>();
- prevGameObject = currentGameObject;
- }
- }
-
- public override TaskStatus OnUpdate()
- {
- if (animation == null) {
- Debug.LogWarning("Animation is null");
- return TaskStatus.Failure;
- }
-
- if (string.IsNullOrEmpty(animationName.Value)) {
- animation.Stop();
- } else {
- animation.Stop(animationName.Value);
- }
-
- return TaskStatus.Success;
- }
-
- public override void OnReset()
- {
- targetGameObject = null;
- animationName = "";
- }
- }
-}
\ No newline at end of file diff --git a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Animation/Stop.cs.meta b/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Animation/Stop.cs.meta deleted file mode 100644 index 8edc170a..00000000 --- a/Assets/ThirdParty/Behavior Designer/Runtime/Basic Tasks/Animation/Stop.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2
-guid: c3dca423f03e936449fdb622cac3f430
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
|