11
This commit is contained in:
parent
f42f4df718
commit
a5c92a0f69
@ -213,10 +213,13 @@ namespace AlicizaX.UI.Runtime
|
||||
|
||||
internal async UniTask InternalOpen()
|
||||
{
|
||||
_state = UIState.Opened;
|
||||
Visible = true;
|
||||
Holder.OnWindowShowEvent?.Invoke();
|
||||
await OnOpenAsync();
|
||||
if (_state != UIState.Opened)
|
||||
{
|
||||
_state = UIState.Opened;
|
||||
Visible = true;
|
||||
Holder.OnWindowShowEvent?.Invoke();
|
||||
await OnOpenAsync();
|
||||
}
|
||||
}
|
||||
|
||||
internal async UniTask InternalClose()
|
||||
|
||||
@ -17,17 +17,14 @@ namespace AlicizaX.UI.Runtime
|
||||
public Action OnWindowClosedEvent;
|
||||
public Action OnWindowDestroyEvent;
|
||||
|
||||
#if UNITY_EDITOR && ALICIZAX_UI_ANIMATION_SUPPORT
|
||||
private void SetAnimtionFlow()
|
||||
{
|
||||
// 编辑器模式下自动重置状态
|
||||
AnimationFlow = GetComponent<AnimationFlow.Runtime.AnimationFlow>();
|
||||
}
|
||||
#endif
|
||||
|
||||
#if ALICIZAX_UI_ANIMATION_SUPPORT
|
||||
public async UniTask PlayAnimtion(string name)
|
||||
{
|
||||
if (AnimationFlow == null)
|
||||
{
|
||||
AnimationFlow = transform.GetComponent<AnimationFlow.Runtime.AnimationFlow>();
|
||||
}
|
||||
await AnimationFlow.PlayAsync(name);
|
||||
}
|
||||
#endif
|
||||
@ -58,13 +55,7 @@ namespace AlicizaX.UI.Runtime
|
||||
internal set { _target.SetActive(value); }
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR && ALICIZAX_UI_ANIMATION_SUPPORT
|
||||
[InlineButton("SetAnimtionFlow")]
|
||||
#endif
|
||||
|
||||
#if ALICIZAX_UI_ANIMATION_SUPPORT
|
||||
[SerializeField]
|
||||
[HideLabel]
|
||||
private AnimationFlow.Runtime.AnimationFlow AnimationFlow;
|
||||
#endif
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user