少年修仙传客户端代码仓库
hch
2025-06-12 204ef05a831c9484e2abc561d27ecbff7c797453
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
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()
    {
    }
}