void Start()
    {
        if (info == null)
        {
            info = ScriptableObject.CreateInstance <ViNoSaveInfo>();
        }

        m_FileExists = ExternalAccessor.IsSaveDataFileExists(fileName);
        if (m_FileExists)
        {
            // Load SaveInfo from Storage.
            ViNo.LoadDataFromStorage(fileName, ref info);
            UpdateText(info.data.m_Date, info.data.m_ScenarioDescription);
        }
        else
        {
            UpdateText("", "NO DATA");
        }

// NGUI Dependency...
#if false
        // Load Mode.
        if (!SystemUIEvent.saveMode)
        {
            continueButton.isEnabled = m_FileExists;
        }
#endif
    }
Beispiel #2
0
    static public bool CheckQuickSaveFileAndLoadFromStorage()
    {
        bool isQuickSaveFileExists = ExternalAccessor.IsSaveDataFileExists(k_QuickSaveFileName);

        if (isQuickSaveFileExists)
        {
            ScenarioCtrl sc = ScenarioCtrl.Instance;
            // Load SaveInfo from Storage.
            ViNo.LoadDataFromStorage(k_QuickSaveFileName, ref sc.quickSaveSlot);
        }
        else
        {
            Debug.LogWarning("Quick Save File not exists.");
        }

        return(isQuickSaveFileExists);
    }
Beispiel #3
0
 static public void SaveByteCodesToFile(string filename, byte[] code)
 {
     ExternalAccessor.SaveAsBinaryFile(filename, code);
 }