public void Start() { t1 = new ushort[10, 10] { { 1, 1, 1, 1, 1, 0, 0, 0, 0, 0 }, { 1, 1, 0, 1, 1, 1, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, { 0, 3, 0, 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 1, 0, 0, 0, 0 }, { 0, 0, 1, 1, 2, 0, 0, 0, 0, 0 }, { 0, 0, 2, 2, 0, 0, 0, 0, 0, 0 }, { 0, 0, 1, 1, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 3, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }; t2 = new ushort[10, 10] { { 1, 1, 1, 1, 1, 0, 0, 0, 0, 0 }, { 1, 1, 0, 1, 1, 1, 0, 0, 0, 0 }, { 0, 0, 3, 3, 3, 0, 0, 0, 0, 0 }, { 0, 3, 0, 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 1, 0, 0, 0, 0 }, { 0, 0, 1, 1, 2, 0, 0, 0, 0, 0 }, { 0, 0, 2, 2, 0, 0, 0, 0, 0, 0 }, { 0, 0, 1, 1, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 3, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }; t1 = CSVParse.Parse(CSVmaps.CSV1, 20, 20); t2 = CSVParse.Parse(CSVmaps.CSV2, 20, 20); t3 = CSVParse.Parse(CSVmaps.CSV3, 20, 20); t4 = CSVParse.Parse(CSVmaps.CSV4, 20, 20); t5 = CSVParse.Parse(CSVmaps.CSV5, 20, 20); BuildLevel(Global.Level); }
public TeachCSV() { parse = new CSVParse("csv/Teach/teach"); foreach (KeyValuePair <int, Dictionary <string, string> > kv in parse.csv_Data) { int id = kv.Key; teachIDList.Add(id); } }
/// <summary> /// 获得csv数据的key列表 /// </summary> /// <param name="parse"></param> /// <returns></returns> public List <int> getKeyList(CSVParse parse) { List <int> keylist = new List <int>(); foreach (int id in parse.csv_Data.Keys) { keylist.Add(id); } return(keylist); }
public GateDataCsv() { parse = new CSVParse("assets/csv/gate_data"); }