修复bug
This commit is contained in:
parent
f118173ae7
commit
cdc5a49106
@ -17,6 +17,7 @@ namespace QFramework.Example
|
||||
public partial class UIHint : UIPanel
|
||||
{
|
||||
ResLoader loader;
|
||||
IAction curAction;
|
||||
protected override void OnInit(IUIData uiData = null)
|
||||
{
|
||||
mData = uiData as UIHintData ?? new UIHintData();
|
||||
@ -31,16 +32,22 @@ namespace QFramework.Example
|
||||
protected override void OnOpen(IUIData uiData = null)
|
||||
{
|
||||
mData = uiData as UIHintData ?? new UIHintData();
|
||||
if (curAction != null)
|
||||
{
|
||||
curAction.Deinit();
|
||||
curAction = null;
|
||||
}
|
||||
|
||||
Icon.gameObject.SetActive(mData.isShowIcon);
|
||||
Label.text = mData.txt;
|
||||
SetItem(1);
|
||||
if (mData.time != -1)
|
||||
{
|
||||
ActionKit.Delay(mData.time, () =>
|
||||
{
|
||||
SetItem(0);
|
||||
|
||||
}).Start(this);
|
||||
curAction = ActionKit.Delay(mData.time, () =>
|
||||
{
|
||||
SetItem(0);
|
||||
});
|
||||
curAction.Start(this);
|
||||
}
|
||||
if (string.IsNullOrEmpty(mData.audio) == false)
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user