Ejemplo n.º 1
0
    /// <summary>
    /// 战前NPC对话
    /// </summary>
    private void DoStartTalks(List <CounterPartDialogUnit> ltalk)
    {
        if (ltalk.Count == 0)
        {
            return;
        }
        MyHead.btnCombat.enabled = false;
        List <int>          lNpcID    = new List <int>();
        List <string>       lStrTalks = new List <string>();
        List <NpcDirection> lWndDirs  = new List <NpcDirection>();

        foreach (CounterPartDialogUnit t in ltalk)
        {
            lNpcID.Add(t.npcid);
            lStrTalks.Add(t.talk);
            lWndDirs.Add((NpcDirection)t.position);
        }
        NpcTalksWnd wnd = WndManager.GetDialog <NpcTalksWnd>();

        wnd.SetData(lNpcID, lStrTalks, lWndDirs);
        ViewStageScene scene = SceneM.GetCurIScene() as ViewStageScene;

        if (scene != null && scene.GoldTransform != null)
        {
            Transform tGoldRoom = scene.GoldTransform;
            LifeObj   obj       = tGoldRoom.GetComponent <LifeObj>();
            if (obj != null)
            {
                Vector3 pos = obj.GetLife().GetLifeProp().HelpPoint.GetVauleByKey(BuildHelpPointName.guidePos).transform.position;
                wnd.SetWndStyle(2, pos);
            }
        }
    }
Ejemplo n.º 2
0
    /// <summary>
    /// 战后NPC对话
    /// </summary>
    private void DoStartTalks(List <CounterPartDialogUnit> ltalk, CallBack callBack)
    {
        List <int>          lNpcID    = new List <int>();
        List <string>       lStrTalks = new List <string>();
        List <NpcDirection> lWndDirs  = new List <NpcDirection>();

        foreach (CounterPartDialogUnit t in ltalk)
        {
            lNpcID.Add(t.npcid);
            lStrTalks.Add(t.talk);
            lWndDirs.Add((NpcDirection)t.position);
        }
        NpcTalksWnd wnd = WndManager.GetDialog <NpcTalksWnd>();

        wnd.SetData(lNpcID, lStrTalks, lWndDirs, callBack);
    }