|
@@ -15,6 +15,7 @@ namespace GFGGame
|
|
|
private GameObject _sceneObject;
|
|
|
private GameObject _scenePrefab;
|
|
|
private GameObject _npcHead;
|
|
|
+ private DressUpObjUI _dressUpObjUI;
|
|
|
private GoWrapper _npcWrapper;
|
|
|
private GTextField _wordTextField;
|
|
|
//剧情完成回调
|
|
@@ -46,6 +47,9 @@ namespace GFGGame
|
|
|
_sceneObject = null;
|
|
|
}
|
|
|
|
|
|
+ _dressUpObjUI?.Dispose();
|
|
|
+ _dressUpObjUI = null;
|
|
|
+
|
|
|
_wordTextField = null;
|
|
|
_arrow = null;
|
|
|
_isShowLetters = false;
|
|
@@ -97,6 +101,10 @@ namespace GFGGame
|
|
|
{
|
|
|
_sceneObject = GameObject.Instantiate(_scenePrefab);
|
|
|
}
|
|
|
+ if(_dressUpObjUI == null)
|
|
|
+ {
|
|
|
+ _dressUpObjUI = new DressUpObjUI();
|
|
|
+ }
|
|
|
_speedAutoPlay = FightDataManager.Instance.dialogSpeed;
|
|
|
_autoPlay = false;
|
|
|
UpdateSpeedUpBtn();
|
|
@@ -361,15 +369,37 @@ namespace GFGGame
|
|
|
}
|
|
|
if (!string.IsNullOrEmpty(headAniRes))
|
|
|
{
|
|
|
+ var headAniCfg = HeadAniCfgArray.Instance.GetCfg(headAniRes);
|
|
|
_ui.m_dialogText.target.visible = false;
|
|
|
_ui.m_dialogName.target.visible = false;
|
|
|
_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;
|
|
|
- string resPath = ResPathUtil.GetViewEffectPath("ui_nzbq", headAniRes);
|
|
|
- SceneController.AddObjectToView(_npcHead, _npcWrapper, _ui.m_dialogHead.m_comphead.m_holder, resPath, out _npcHead, out _npcWrapper);
|
|
|
- // _npcHead.transform.localScale = new Vector3(-100, 100, 100);
|
|
|
+
|
|
|
+ if (headAniCfg.faceId > 0)
|
|
|
+ {
|
|
|
+ //换装表情
|
|
|
+ _ui.m_dialogHead.m_compDressUp.target.visible = true;
|
|
|
+ _ui.m_dialogHead.m_comphead.target.visible = false;
|
|
|
+ _dressUpObjUI.ResetSceneObj(80, true, false, null, false);
|
|
|
+ _dressUpObjUI.dressUpObj.PutOnDressUpData(CustomSuitDataManager.GetCurrentSuitData().dressUpData);
|
|
|
+ if(_dressUpObjUI.dressUpObj.actionId > 0)
|
|
|
+ {
|
|
|
+ _dressUpObjUI.dressUpObj.CancelAction(true);
|
|
|
+ }
|
|
|
+ _dressUpObjUI.dressUpObj.AddOrRemove(headAniCfg.faceId, false);
|
|
|
+ _dressUpObjUI.UpdateWrapper(_ui.m_dialogHead.m_compDressUp.m_holder);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ //独立动画
|
|
|
+ _ui.m_dialogHead.m_compDressUp.target.visible = false;
|
|
|
+ _ui.m_dialogHead.m_comphead.target.visible = true;
|
|
|
+ string resPath = ResPathUtil.GetViewEffectPath("ui_nzbq", headAniCfg.headAni);
|
|
|
+ SceneController.AddObjectToView(null, _npcWrapper, _ui.m_dialogHead.m_comphead.m_holder, resPath, out _npcHead, out _npcWrapper);
|
|
|
+ }
|
|
|
+
|
|
|
_wordTextField = _ui.m_dialogHead.m_txtContent;
|
|
|
_arrow = _ui.m_dialogHead.m_iconNext;
|
|
|
}
|