|
@@ -8,6 +8,7 @@ using System;
|
|
|
using YooAsset;
|
|
|
using GFGGame.Launcher;
|
|
|
using UnityEngine.UI;
|
|
|
+using System.Threading.Tasks;
|
|
|
|
|
|
namespace GFGGame
|
|
|
{
|
|
@@ -514,10 +515,10 @@ namespace GFGGame
|
|
|
if (!string.IsNullOrEmpty(headAniRes) || storyDialogCfg.suitId > 0)
|
|
|
{
|
|
|
//显示对话框半身像
|
|
|
- _ui.m_dialogHead.target.visible = true;
|
|
|
_ui.m_dialogHead.m_txtName.text = roleName;
|
|
|
_ui.m_dialogHead.m_comphead.m_head.visible = false;
|
|
|
_ui.m_dialogHead.m_comphead.m_holder.visible = true;
|
|
|
+ _ui.m_dialogHead.m_txtContent.text = "";
|
|
|
|
|
|
var headAniCfg = HeadAniCfgArray.Instance.GetCfg(headAniRes);
|
|
|
if (headAniCfg != null && !string.IsNullOrEmpty(headAniCfg.headAni))
|
|
@@ -530,7 +531,6 @@ namespace GFGGame
|
|
|
else
|
|
|
{
|
|
|
//换装
|
|
|
- _ui.m_dialogHead.m_compDressUp.target.visible = true;
|
|
|
_ui.m_dialogHead.m_comphead.target.visible = false;
|
|
|
|
|
|
//_dressUpObjUI.ResetSceneObj(80, true, false, sceneObject.transform.Find("Scene").gameObject, false);
|
|
@@ -554,7 +554,9 @@ namespace GFGGame
|
|
|
_dressUpObj.AddOrRemove(headAniCfg.faceId, true);
|
|
|
//_dressUpObjUI.UpdateWrapper(_ui.m_dialogHead.m_compDressUp.m_holder);
|
|
|
}
|
|
|
+ ShowSelfHeadImg();
|
|
|
}
|
|
|
+ _ui.m_dialogHead.target.visible = true;
|
|
|
_wordTextField = _ui.m_dialogHead.m_txtContent;
|
|
|
_arrow = _ui.m_dialogHead.m_iconNext;
|
|
|
lastTextFieldType = "head";
|
|
@@ -648,7 +650,16 @@ namespace GFGGame
|
|
|
// OnStepComplete();
|
|
|
//}
|
|
|
}
|
|
|
+ }
|
|
|
|
|
|
+ /// <summary>
|
|
|
+ /// 延迟显示头像,防止换装异步加载/换表情 未完成时显示了头像
|
|
|
+ /// </summary>
|
|
|
+ private async void ShowSelfHeadImg()
|
|
|
+ {
|
|
|
+ _ui.m_dialogHead.m_compDressUp.target.visible = false;
|
|
|
+ await Task.Delay(10);
|
|
|
+ _ui.m_dialogHead.m_compDressUp.target.visible = true;
|
|
|
}
|
|
|
|
|
|
private void ShowNextDialog()
|