using System;
|
using vnxbqy.UI;
|
using UnityEngine;
|
|
public class PN_OpenDialog : ProcessNode
|
{
|
private bool m_IsOver = false;
|
|
public PN_OpenDialog(GA_NpcClientFightNorm npcFight, int dialogID)
|
{
|
m_Target = npcFight;
|
intParam = dialogID;
|
m_IsOver = false;
|
}
|
|
public sealed override void Init()
|
{
|
var _model = ModelCenter.Instance.GetModel<GuideDialogueModel>();
|
_model.dialogID = intParam;
|
_model.onClose = DialogFinish;
|
|
WindowCenter.Instance.CloseOthers<GuideDialogueWin>();
|
WindowCenter.Instance.Open<GuideDialogueWin>();
|
WindowCenter.Instance.Close<MainInterfaceWin>();
|
|
GA_Hero _hero = PlayerDatas.Instance.hero;
|
if (_hero != null)
|
{
|
_hero.Behaviour.StopKillUntilDieAI();
|
_hero.Behaviour.StopHandupAI();
|
}
|
#if UNITY_EDITOR
|
if (RuntimeLogUtility.s_LogProcessInfo)
|
{
|
Debug.LogFormat("开始对话: {0}", intParam);
|
}
|
#endif
|
m_Target.isTalking = true;
|
}
|
|
private void DialogFinish()
|
{
|
m_IsOver = true;
|
#if UNITY_EDITOR
|
if (RuntimeLogUtility.s_LogProcessInfo)
|
{
|
Debug.LogFormat("对话: {0} 结束", intParam);
|
}
|
#endif
|
}
|
|
public sealed override bool IsOver()
|
{
|
return m_IsOver;
|
}
|
|
public sealed override void UnInit()
|
{
|
m_Target.isTalking = false;
|
WindowCenter.Instance.Open<MainInterfaceWin>();
|
}
|
|
public sealed override void Update()
|
{
|
}
|
}
|