修改
This commit is contained in:
parent
784016415e
commit
5ea3821b3f
@ -1,5 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using AlicizaX.UI.Runtime;
|
||||
using Sirenix.OdinInspector;
|
||||
using UnityEngine;
|
||||
|
||||
namespace AlicizaX.UI.Extension.UXComponent
|
||||
@ -7,11 +9,30 @@ namespace AlicizaX.UI.Extension.UXComponent
|
||||
[RequireComponent(typeof(AnimationFlow.Runtime.AnimationFlow))]
|
||||
public class UXUIAnimation : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private AnimationFlow.Runtime.AnimationFlow animationFlow;
|
||||
[SerializeField] private string ShowAnimationName = "Show";
|
||||
[SerializeField] private string HideAnimationName = "Close";
|
||||
private UIHolderObjectBase _holderObjectBase;
|
||||
[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;
|
||||
|
||||
private UIHolderObjectBase _holderObjectBase;
|
||||
#if UNITY_EDITOR
|
||||
public List<string> GetAllAnimationClips
|
||||
{
|
||||
get
|
||||
{
|
||||
if (animationFlow == null)
|
||||
{
|
||||
animationFlow = GetComponent<AnimationFlow.Runtime.AnimationFlow>();
|
||||
}
|
||||
|
||||
return animationFlow.GetAllAnimationClips;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
private void OnValidate()
|
||||
{
|
||||
animationFlow = GetComponent<AnimationFlow.Runtime.AnimationFlow>();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user