Esempio n. 1
0
    public void Json_Data_Load_Area_Number_2()
    {
        if (File.Exists(mobile_Path + "/" + "save_02.json"))
        {
            string load_Json = File.ReadAllText(mobile_Path + "/" + "save_02.json");

            Json_Game_Data load_Data = new Json_Game_Data();
            JsonUtility.FromJsonOverwrite(load_Json, load_Data);

            int temp = (load_Data.power + load_Data.con + load_Data.hp) * 2 + 11000;
            if (load_Data.save_Code == temp)
            {
                Game_Controller.instance.Clicked_Button_To_Condition_Panel_From_Load();
                Load_Json_Parsing_Data(load_Data);
            }
            else
            {
                Game_Controller.instance.Clicked_Button_Erorr_Panel();
            }
        }
        else
        {
            Debug.Log("json data(save_2) 파일 찾지 못함!");
            Game_Controller.instance.Clicked_Button_Erorr_Panel();
        }
    }
Esempio n. 2
0
    private void Json_Data_Save_Area_Number_2()
    {
        save_Data_02 = new Json_Game_Data(int.Parse(text_Condition[0].text.ToString()),
                                          int.Parse(text_Condition[1].text.ToString()),
                                          int.Parse(text_Condition[2].text.ToString()));

        string save_Json = JsonUtility.ToJson(save_Data_02);

        File.WriteAllText(mobile_Path + "/" + "save_02.json", save_Json);
    }
Esempio n. 3
0
 private void Load_Json_Parsing_Data(Json_Game_Data data)
 {
     text_Condition[0].text = data.power.ToString();
     text_Condition[1].text = data.con.ToString();
     text_Condition[2].text = data.hp.ToString();
 }