Пример #1
0
    public void SaveScoreToLocal()
    {
        List <string> col = new List <string>();
        List <string> val = new List <string>();

        col.Add("name");
        col.Add("email");
        col.Add("contact");
        col.Add("game_score");
        col.Add("voucher_id");
        col.Add("created_at");
        col.Add("is_submitted");

        val.Add(PlayerPrefs.GetString("name"));
        val.Add(PlayerPrefs.GetString("email"));
        val.Add(PlayerPrefs.GetString("contact"));
        val.Add(PlayerPrefs.GetString(gameSettings.scoreName));
        //  val.Add(PlayerPrefs.GetString("voucher_id"));
        val.Add(2.ToString());
        val.Add(PlayerPrefs.GetString("created_at"));
        val.Add("false");

        // string msg = userDb.AddData(user);
        SetUpDb();
        string msg = userDb.AddData(col, val);

        userDb.Close();

        if (msg != "true")
        {
            localScoreNotSaveHandler.SetActive(true);
            localNotSaveCodeText.text = msg;
        }
    }