Example #1
0
 // Use this for initialization
 void Start()
 {
     DontDestroyOnLoad(gameObject);
     alimentosDatas       = new AllAlimentosData();
     bolosDatas           = new AllBolosData();
     caminhosDatas        = new AllCaminhosData();
     coletandoOvosDatas   = new AllColetandoOvosData();
     contandoBixosDatas   = new AllContandoBixosData();
     ditadosDatas         = new AllDitadosData();
     hortaDatas           = new AllHortaData();
     memoriaDatas         = new AllMemoriaData();
     olhoNoLoboDatas      = new AllOlhoNoLoboData();
     pastoreiraDatas      = new AllPastoreiraData();
     piqueDatas           = new AllPiqueData();
     sequenciaSonoraDatas = new AllSequenciaSonoraData();
 }
Example #2
0
    private void LoadHortaData()
    {
        string filePath = Application.dataPath + gameDataHorta;

        if (File.Exists(filePath))
        {
            string dataAsJson = File.ReadAllText(filePath);
            Debug.Log("Load: " + dataAsJson);
            AllHortaData loadedData = (JsonUtility.FromJson <AllHortaData>(dataAsJson));
            Debug.Log(loadedData);
            if (loadedData != null)
            {
                hortaDatas = loadedData;
            }
        }
        else
        {
            Debug.LogError("Não encontrou o save da Memória");
        }
    }