コード例 #1
0
    public void Load()
    {
        string str;

        using (StreamReader sr = new StreamReader(MapDefine.MAP_DATA_PATH))
        {
            str = sr.ReadToEnd();
        }

        MapRecord mapRecord = JsonMapper.ToObject <MapRecord>(str);

        for (int i = 0; i < mapRecord.Row; i++)
        {
            for (int j = 0; j < mapRecord.Column; j++)
            {
                MapGrid mapGrid = _mapGridArray[GetIndex(i, j, mapRecord.Column)];
                mapGrid.Select = mapRecord.GetSelect(i, j) == MapDefine.SELECT;
            }
        }
    }