|
@@ -69,20 +69,15 @@ namespace GFGGame
|
|
base.Dispose();
|
|
base.Dispose();
|
|
}
|
|
}
|
|
|
|
|
|
- protected override void Init()
|
|
|
|
|
|
+ protected override void OnInit()
|
|
{
|
|
{
|
|
- base.Init();
|
|
|
|
|
|
+ base.OnInit();
|
|
packageName = UI_StoryDialogUI.PACKAGE_NAME;
|
|
packageName = UI_StoryDialogUI.PACKAGE_NAME;
|
|
_ui = UI_StoryDialogUI.Create();
|
|
_ui = UI_StoryDialogUI.Create();
|
|
viewCom = _ui.target;
|
|
viewCom = _ui.target;
|
|
isfullScreen = true;
|
|
isfullScreen = true;
|
|
- isReturnView = true;
|
|
|
|
-
|
|
|
|
- }
|
|
|
|
|
|
|
|
- protected override void OnInit()
|
|
|
|
- {
|
|
|
|
- base.OnInit();
|
|
|
|
|
|
+ isReturnView = true;
|
|
_ui.m_dialogText.target.visible = false;
|
|
_ui.m_dialogText.target.visible = false;
|
|
_ui.m_dialogName.target.visible = false;
|
|
_ui.m_dialogName.target.visible = false;
|
|
_ui.m_dialogHead.target.visible = false;
|
|
_ui.m_dialogHead.target.visible = false;
|
|
@@ -147,18 +142,18 @@ namespace GFGGame
|
|
if (_storyStartID == MainStoryDataManager.priorId)
|
|
if (_storyStartID == MainStoryDataManager.priorId)
|
|
{
|
|
{
|
|
_ui.m_c1.selectedIndex = 1;
|
|
_ui.m_c1.selectedIndex = 1;
|
|
- // _ui.m_btnAutoPlay.selected = true;
|
|
|
|
OnClickBtnAutoPlay();
|
|
OnClickBtnAutoPlay();
|
|
_speedAutoPlay = 1;
|
|
_speedAutoPlay = 1;
|
|
FightDataManager.Instance.dialogSpeed = _speedAutoPlay;
|
|
FightDataManager.Instance.dialogSpeed = _speedAutoPlay;
|
|
}
|
|
}
|
|
|
|
|
|
- if (IsTeaParty) {
|
|
|
|
|
|
+ if (IsTeaParty)
|
|
|
|
+ {
|
|
_ui.m_c1.selectedIndex = 2;
|
|
_ui.m_c1.selectedIndex = 2;
|
|
}
|
|
}
|
|
|
|
|
|
_ui.m_btnBack.visible = InstanceZonesDataManager.CheckLevelPass(100001001);
|
|
_ui.m_btnBack.visible = InstanceZonesDataManager.CheckLevelPass(100001001);
|
|
-
|
|
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
protected override void OnHide()
|
|
protected override void OnHide()
|
|
@@ -183,11 +178,9 @@ namespace GFGGame
|
|
|
|
|
|
private void OnClickBtnBack()
|
|
private void OnClickBtnBack()
|
|
{
|
|
{
|
|
-
|
|
|
|
- ViewManager.Show<StoryChapterView>(MainStoryDataManager.currentChapterCfgId, ViewManager.GetGoBackDatas(typeof(StoryChapterView).FullName), true);
|
|
|
|
- this.Hide();
|
|
|
|
- //ViewManager.GoBackFrom(typeof(StoryDialogView).FullName);
|
|
|
|
- // Over(false);
|
|
|
|
|
|
+ //Hide();
|
|
|
|
+ //ViewManager.Show<StoryChapterView>(MainStoryDataManager.currentChapterCfgId, ViewManager.GetGoBackDatas(typeof(StoryChapterView).FullName), true);
|
|
|
|
+ Over(false);
|
|
}
|
|
}
|
|
|
|
|
|
private void OnClickBtnNext()
|
|
private void OnClickBtnNext()
|
|
@@ -430,6 +423,11 @@ namespace GFGGame
|
|
string roleName = storyDialogCfg.name;
|
|
string roleName = storyDialogCfg.name;
|
|
string headRes = storyDialogCfg.head;
|
|
string headRes = storyDialogCfg.head;
|
|
string headAniRes = storyDialogCfg.headAni;
|
|
string headAniRes = storyDialogCfg.headAni;
|
|
|
|
+
|
|
|
|
+ VoiceManager.Instance.StopVoice();
|
|
|
|
+ // 如果配置了语音,读取语音
|
|
|
|
+ VoiceManager.Instance.LoadRes(ResPathUtil.GetCardSoundPath("111111111"));
|
|
|
|
+
|
|
if (roleName == "self")
|
|
if (roleName == "self")
|
|
{
|
|
{
|
|
roleName = RoleDataManager.roleName;
|
|
roleName = RoleDataManager.roleName;
|
|
@@ -472,7 +470,6 @@ namespace GFGGame
|
|
{
|
|
{
|
|
_dressUpObjUI.dressUpObj.CancelAction(true);
|
|
_dressUpObjUI.dressUpObj.CancelAction(true);
|
|
}
|
|
}
|
|
- //_dressUpObjUI.dressUpObj.PutOnDressUpData(_dressUpObjUI.dressUpObj.DressUpDataClone(), new int[] { ConstDressUpItemType.SHOU_CHI_WU });
|
|
|
|
}
|
|
}
|
|
if (headAniCfg != null && headAniCfg.faceId > 0)
|
|
if (headAniCfg != null && headAniCfg.faceId > 0)
|
|
{
|
|
{
|
|
@@ -554,6 +551,7 @@ namespace GFGGame
|
|
}
|
|
}
|
|
_wordList = Regex.Split(words, "&&");
|
|
_wordList = Regex.Split(words, "&&");
|
|
_wordIndex = 0;
|
|
_wordIndex = 0;
|
|
|
|
+
|
|
_typingEffect = new TypingFadeEffectPro(_wordTextField);
|
|
_typingEffect = new TypingFadeEffectPro(_wordTextField);
|
|
_typingEffect.typeFinishedAction = ShowCurrentWords;
|
|
_typingEffect.typeFinishedAction = ShowCurrentWords;
|
|
|
|
|
|
@@ -596,7 +594,8 @@ namespace GFGGame
|
|
_wordIndex++;
|
|
_wordIndex++;
|
|
if (_autoPlay)
|
|
if (_autoPlay)
|
|
{
|
|
{
|
|
- Timers.inst.Add(GameConst.NEXT_WORDS_INTERVAL_MAX / _speedAutoPlay, 1, ShowNextWords);
|
|
|
|
|
|
+ int interval = (int)Mathf.Max(VoiceManager.Instance.GetClipLength(), GameConst.NEXT_WORDS_INTERVAL_MAX / _speedAutoPlay);
|
|
|
|
+ Timers.inst.Add(interval, 1, ShowNextWords);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -642,10 +641,16 @@ namespace GFGGame
|
|
StartTyping();
|
|
StartTyping();
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /// <summary>
|
|
|
|
+ /// 开启打字机显示
|
|
|
|
+ /// </summary>
|
|
private void StartTyping()
|
|
private void StartTyping()
|
|
{
|
|
{
|
|
_typingEffect.SetSpeed(_speedAutoPlay);
|
|
_typingEffect.SetSpeed(_speedAutoPlay);
|
|
_typingEffect.Start();
|
|
_typingEffect.Start();
|
|
|
|
+
|
|
|
|
+ // 如果配置了语音,则播放语音
|
|
|
|
+ VoiceManager.Instance.PlayVoice();
|
|
}
|
|
}
|
|
|
|
|
|
private void StopTyping()
|
|
private void StopTyping()
|