|
@@ -407,7 +407,6 @@ namespace GFGGame
|
|
_ui.m_list.visible = false;
|
|
_ui.m_list.visible = false;
|
|
}
|
|
}
|
|
|
|
|
|
- //private int num = 0;
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
/// 初始化对话框/语音/CG等
|
|
/// 初始化对话框/语音/CG等
|
|
/// </summary>
|
|
/// </summary>
|
|
@@ -445,16 +444,14 @@ namespace GFGGame
|
|
VoiceManager.Instance.LoadRes(ResPathUtil.GetCardSoundPath("test", "wav"));
|
|
VoiceManager.Instance.LoadRes(ResPathUtil.GetCardSoundPath("test", "wav"));
|
|
_wordList = Regex.Split(words, "&&");
|
|
_wordList = Regex.Split(words, "&&");
|
|
|
|
|
|
- //++num;
|
|
|
|
- // 没有对话
|
|
|
|
- if (_wordList.Length == 0)
|
|
|
|
- //if (num == 1)
|
|
|
|
|
|
+ if (effectInfo.Length > 0)
|
|
{
|
|
{
|
|
// 等待CG播放完毕直接进入下一段
|
|
// 等待CG播放完毕直接进入下一段
|
|
- //Timers.inst.StartCoroutine(WaitCGAnimFinish());
|
|
|
|
|
|
+ Timers.inst.StartCoroutine(WaitCGAnimFinish(int.Parse(effectInfo[1])));
|
|
}
|
|
}
|
|
|
|
+
|
|
// 有对话
|
|
// 有对话
|
|
- else
|
|
|
|
|
|
+ if (_wordList.Length > 0)
|
|
{
|
|
{
|
|
if (roleName == "self")
|
|
if (roleName == "self")
|
|
{
|
|
{
|
|
@@ -829,13 +826,13 @@ namespace GFGGame
|
|
Timers.inst.Remove(ShowNextWords);
|
|
Timers.inst.Remove(ShowNextWords);
|
|
}
|
|
}
|
|
|
|
|
|
- private IEnumerator WaitCGAnimFinish()
|
|
|
|
|
|
+ private IEnumerator WaitCGAnimFinish(int times = 1)
|
|
{
|
|
{
|
|
- GameObject cg = PrefabManager.Instance.InstantiateSync(ResPathUtil.GetStoryDialogCGPath("cg_shenjiao"));
|
|
|
|
|
|
+ GameObject cg = PrefabManager.Instance.InstantiateSync(ResPathUtil.GetStoryDialogCGPath("cg_libeihe"));
|
|
Animator animator = cg.GetComponentInChildren<Animator>();
|
|
Animator animator = cg.GetComponentInChildren<Animator>();
|
|
AnimatorStateInfo info = animator.GetCurrentAnimatorStateInfo(0);
|
|
AnimatorStateInfo info = animator.GetCurrentAnimatorStateInfo(0);
|
|
|
|
|
|
- yield return new WaitForSeconds(info.length);
|
|
|
|
|
|
+ yield return new WaitForSeconds(info.length * times);
|
|
//while (info.normalizedTime < 0.95)
|
|
//while (info.normalizedTime < 0.95)
|
|
//{
|
|
//{
|
|
// info = animator.GetCurrentAnimatorStateInfo(0);
|
|
// info = animator.GetCurrentAnimatorStateInfo(0);
|