Пример #1
0
        public void StartPathFindToNpcFly(string scene, string target_scene, string npcid)
        {
            ClearPath();
            if (!scene.Equals(target_scene))
            {
                PathProcessTransferNode node_t = new PathProcessTransferNode(scene, target_scene, target_scene);
                m_Queue.Enqueue(node_t);
            }

            PathProcessToNpcNode node_p = new PathProcessToNpcNode(target_scene, target_scene, npcid);

            m_Queue.Enqueue(node_p);
            Process();
        }
Пример #2
0
        // public void InitPathFinder(Dictionary<string, Data.MainLandTemplate> MainLandTbl)
        // {
        //     m_PathFinder.InitMap(MainLandTbl);
        // }

        public void StartPathFindToNpc(string scene, string target_scene, string npcid)
        {
            ClearPath();
            if (!scene.Equals(target_scene))
            {
                List <WorldPathNode> path;
                if (m_PathFinder.GetPath(scene, target_scene, out path))
                {
                    for (int i = 0; i < path.Count; i++)
                    {
                        PathProcessToTransferPointNode node_tpn = new PathProcessToTransferPointNode(path[i].scene, target_scene, path[i].locator);
                        m_Queue.Enqueue(node_tpn);
                    }
                }
            }

            PathProcessToNpcNode node_p = new PathProcessToNpcNode(target_scene, target_scene, npcid);

            m_Queue.Enqueue(node_p);
            Process();
        }