Exemplo n.º 1
0
    void Awake()
    {
        string G2_P = PlayerPrefs.GetString("G2_P", "");

        if (G2_P != "")
        {
            print(G2_P);
            Game_P = JsonUtility.FromJson <G2_Game_P> (G2_P);
        }
        _ = this;
    }
Exemplo n.º 2
0
    void Start()
    {
        string Json = PlayerPrefs.GetString(Key, "");

        if (Json != "")
        {
            Game_P = JsonUtility.FromJson <G2_Game_P> (Json);
        }
        else
        {
            print("沒記錄");
        }
        Set_PUIs [0].Del += (f) =>
        {
            Game_P.Time = (int)f;
        };
        Set_PUIs [1].Del += (f) =>
        {
            Game_P.AddScore = (int)f;
        };
        Set_PUIs [2].Del += (f) =>
        {
            Game_P.SubScore = (int)f;
        };
        Set_PUIs [3].Del += (f) =>
        {
            Game_P.QA_Count = (int)f;
        };

        OKButt.Del += (g) =>
        {
            PlayerPrefs.SetString(Key, JsonUtility.ToJson(Game_P));
            SceneManager.LoadScene("G2");
        };

        Open();
    }