Exemple #1
0
    private void CreateNewLevelAndStoreIt()
    {
        var soverview = new SOverview().Initialize();

        StoreLevel(soverview);
        Load();
    }
Exemple #2
0
 private void Load()
 {
     if (!File.Exists(FilePath))
     {
         SelectedGame = new SOverview().Initialize();
         StoreLevel(SelectedGame);
     }
     else
     {
         SelectedGame = JsonUtility.FromJson <SOverview>(File.ReadAllText(FilePath));
     }
 }
Exemple #3
0
    private static void StoreLevel(SOverview overview)
    {
        var json = JsonUtility.ToJson(overview);

        File.WriteAllText(FilePath, json);
    }