Exemple #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();
 }
Exemple #2
0
    private void LoadColetandoOvosData()
    {
        string filePath = Application.dataPath + gameDataColetandoOvos;

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