Ejemplo n.º 1
0
        private void InitMapWayPoint()
        {
            if (mapWayPoint == null)
            {
                mapWayPoint = new Dictionary <int, List <Vector3> >();
            }

            List <SXML> list = AutoplayXml.GetNodeList("map");

            for (int i = 0; i < list.Count; i++)
            {
                List <SXML>    xml   = list[i].GetNodeList("pos");
                int            mapid = list[i].getInt("id");
                List <Vector3> poss  = new List <Vector3>();
                for (int j = 0; j < xml.Count; j++)
                {
                    Vector3 p = new Vector3();
                    p.x = xml[j].getInt("x");
                    p.y = xml[j].getInt("y");
                    p.z = xml[j].getInt("z");
                    poss.Add(p);
                }
                mapWayPoint[mapid] = poss;
            }
        }
Ejemplo n.º 2
0
        public List <int> GetAllMpDrugID()
        {
            List <SXML> nmps = AutoplayXml.GetNodeList("nmp");
            List <int>  ids  = new List <int>();

            for (int i = 0; i < nmps.Count; i++)
            {
                int id = nmps[i].getInt("id");
                ids.Add(id);
            }
            nmps = null;
            return(ids);
        }
Ejemplo n.º 3
0
        private void ReadLocalCfg()
        {
            List <SXML> conf = AutoplayXml.GetNodeList("conf_fb");

            for (int i = 0; i < conf.Count; i++)
            {
                float       mdis_fb    = conf[i].getFloat("mdis_fb");
                float       pickdis_fb = conf[i].getFloat("pickdis_fb");
                float       pkdis_fb   = conf[i].getFloat("pkdis_fb");
                List <int>  mapList    = new List <int>();
                List <SXML> maps       = conf[i].GetNodeList("map");
                for (int j = 0; j < maps.Count; j++)
                {
                    mapList.Add(maps[j].getInt("map_id"));
                }
                autoplayCfg4FB.Add(new AutoPlayConfig4FB {
                    Distance = mdis_fb, DistancePick = pickdis_fb, DistancePK = pkdis_fb, map = mapList
                });
            }
        }