diff --git a/Runtime/AlicizaX.UI.Extension.asmdef b/Runtime/AlicizaX.UI.Extension.asmdef index 2466096..67a991d 100644 --- a/Runtime/AlicizaX.UI.Extension.asmdef +++ b/Runtime/AlicizaX.UI.Extension.asmdef @@ -5,8 +5,7 @@ "GUID:6055be8ebefd69e48b49212b09b47b2f", "GUID:80ecb87cae9c44d19824e70ea7229748", "GUID:75469ad4d38634e559750d17036d5f7c", - "GUID:1619e00706139ce488ff80c0daeea8e7", - "GUID:189d55e03d78888459720d730f4d2424" + "GUID:1619e00706139ce488ff80c0daeea8e7" ], "includePlatforms": [], "excludePlatforms": [], diff --git a/Runtime/UXComponent/UXUIAnimation.cs b/Runtime/UXComponent/UXUIAnimation.cs deleted file mode 100644 index 26651cd..0000000 --- a/Runtime/UXComponent/UXUIAnimation.cs +++ /dev/null @@ -1,77 +0,0 @@ -using System; -using System.Collections.Generic; -using AlicizaX.UI.Runtime; -using Sirenix.OdinInspector; -using UnityEngine; - -namespace AlicizaX.UI.Extension.UXComponent -{ - [RequireComponent(typeof(AnimationFlow.Runtime.AnimationFlow))] - public class UXUIAnimation : MonoBehaviour - { - [ReadOnly] [SerializeField] private AnimationFlow.Runtime.AnimationFlow animationFlow; - - [LabelText("显示动画")] [BoxGroup("基础设置", true)] [ValueDropdown("GetAllAnimationClips", ExpandAllMenuItems = true)] [SerializeField] - private string ShowAnimationName; - - [LabelText("关闭动画")] [BoxGroup("基础设置", true)] [ValueDropdown("GetAllAnimationClips", ExpandAllMenuItems = true)] [SerializeField] - private string HideAnimationName; - - [LabelText("关闭动画")] [BoxGroup("基础设置", true)] [ValueDropdown("GetAllAnimationClips", ExpandAllMenuItems = true)] [SerializeField] - private string InitAnimationName; - - private UIHolderObjectBase _holderObjectBase; -#if UNITY_EDITOR - public List GetAllAnimationClips - { - get - { - if (animationFlow == null) - { - animationFlow = GetComponent(); - } - - return animationFlow.GetAllAnimationClips; - } - } - -#endif - private void OnValidate() - { - animationFlow = GetComponent(); - } - - private void Awake() - { - _holderObjectBase = GetComponent(); - _holderObjectBase.OnWindowShowEvent += ShowAnimation; - _holderObjectBase.OnWindowClosedEvent += CloseAnimation; - _holderObjectBase.OnWindowInitEvent += InitAnimation; - } - - private void OnDestroy() - { - _holderObjectBase.OnWindowInitEvent -= InitAnimation; - _holderObjectBase.OnWindowShowEvent -= ShowAnimation; - _holderObjectBase.OnWindowClosedEvent -= CloseAnimation; - } - - private void InitAnimation() - { - if (!string.IsNullOrEmpty(InitAnimationName)) - { - animationFlow.Play(InitAnimationName); - } - } - - internal void ShowAnimation() - { - animationFlow.Play(ShowAnimationName); - } - - internal void CloseAnimation() - { - animationFlow.Play(HideAnimationName); - } - } -} diff --git a/Runtime/UXComponent/UXUIAnimation.cs.meta b/Runtime/UXComponent/UXUIAnimation.cs.meta deleted file mode 100644 index f406231..0000000 --- a/Runtime/UXComponent/UXUIAnimation.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 72bd03ed7aed41ad81879dbb4dc96f71 -timeCreated: 1758701015 \ No newline at end of file