Example #1
0
        /// <summary>
        /// 分割NPC编号字符串
        /// </summary>
        /// <param name="npcs"></param>
        /// <returns></returns>
        private List <int> SplitNPCs(string npcs)
        {
            string[]   text    = DataTableExtension.SplitValue(npcs);
            List <int> npcList = new List <int>();

            foreach (var s in text)
            {
                npcList.Add(int.Parse(s));
            }

            return(npcList);
        }
Example #2
0
        /// <summary>
        /// 分割字符串
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
        private List <int> Split(string str)
        {
            var text = DataTableExtension.SplitValue(str);
            var list = new List <int>();

            foreach (var s in text)
            {
                list.Add(int.Parse(s));
            }

            return(list);
        }
Example #3
0
 /// <summary>
 /// 分割位置信息字符串
 /// </summary>
 /// <param name="position"></param>
 /// <returns></returns>
 private Vector3 SplitPosition(string position)
 {
     string[] text = DataTableExtension.SplitValue(position);
     return(new Vector3(float.Parse(text[0]), float.Parse(text[1]), float.Parse(text[2])));
 }
Example #4
0
        private List <int> Split(string str)
        {
            var text = DataTableExtension.SplitValue(str);

            return(text.Select(int.Parse).ToList());
        }
Example #5
0
 /// <summary>
 /// 分割字符串
 /// </summary>
 /// <param name="str"></param>
 /// <returns></returns>
 private int[] Split(string str)
 {
     string[] text = DataTableExtension.SplitValue(str);
     return(new[] { int.Parse(text[0]), int.Parse(text[1]), int.Parse(text[2]) });
 }