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