Ejemplo n.º 1
0
    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);
    }
Ejemplo n.º 2
0
    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);
        }
    }
Ejemplo n.º 3
0
    /// <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);
    }
Ejemplo n.º 4
0
 public GateDataCsv()
 {
     parse = new CSVParse("assets/csv/gate_data");
 }