Exemple #1
0
    void SaveCurrentGameState()
    {
        JsonWrapper wrapper = new JsonWrapper();
        GameData    data    = new GameData();

        data.GoldenBallsCollected = goldenBallsCollected;
        data.skinSelected         = 0;
        wrapper.gameData          = data;
        wrapper.SaveData();
    }
Exemple #2
0
    // Use this for initialization
    void Start()
    {
        DontDestroyOnLoad(gameObject);
        doors = new int[]
        {
            0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
        };
        wrapper.Path = Application.persistentDataPath + "/" + wrapper.Filename;
        var questions    = new List <Question>();
        var questionData = new QuestionData();

        questions = AddQuestions(questions);

        questionData.Questions = questions;
        wrapper.SaveData(questionData);
        SceneManager.LoadScene("Roomly");
    }