Exemple #1
0
        void Start()
        {
            MapData data = new MapData();

            data.Deserialize(map);

            Json_MasterParam   master = LitJson.JsonMapper.ToObject <Json_MasterParam>(json.text);
            Json_CalenderParam d      = master.calender;
            CalenderParam      cp     = new CalenderParam();

            cp.Desrialize(d);
            int year = cp.Year;


            width  = data.mMapData.Width;
            height = data.mMapData.Height;
            types  = data.mMapData.MapData;
            for (int h = 0; h < height; ++h)
            {
                for (int w = 0; w < width; ++w)
                {
                    //Debug.Log(h * height + w);

                    if (types[h * height + w] == FloorType.Hatake)
                    {
                        GameObject obj = Instantiate <GameObject>(hatake);
                        obj.transform.position = new Vector3((float)w, 0.1f, (float)height - h);
                        obj.transform.rotation = new Quaternion();
                    }
                }
            }
        }
Exemple #2
0
 public void Deserialize(Json_MasterParam json)
 {
     //Fix = json.fix;
     Calender = json.calender;
 }
Exemple #3
0
 public void Deserialize(Json_MasterParam json)
 {
     //Fix = json.fix;
     Calender = json.calender;
 }