Esempio n. 1
0
    private static void SaveOnProgramData(List <string> waves)
    {
        var pData = XMLSerie.ReadXMLProgram();

        pData.Voices = waves;
        XMLSerie.WriteXMLProgram(pData);
    }
Esempio n. 2
0
    /// <summary>
    /// Saves to file audio settings
    /// </summary>
    public static void SaveToFile()
    {
        SaveToFilePlayerPref();
        //Debug.Log("Saving settings");

        return;

        var pData = XMLSerie.ReadXMLProgram();

        pData.SoundIsOn = Settings.ISSoundOn;
        pData.MusicIsOn = Settings.ISMusicOn;

        pData.SoundLevel = AudioCollector.SoundLevel;
        pData.MusicLevel = AudioCollector.MusicLevel;

        pData.Units        = Unit.CurrentSystem();
        pData.AutoSaveFrec = AutoSaveFrec;

        //screen
        pData.QualityLevel = QualitySettings.GetQualityLevel();
        pData.isFullScreen = Screen.fullScreen;

        pData.Lang = Languages.CurrentLang();

        XMLSerie.WriteXMLProgram(pData);
    }
Esempio n. 3
0
    /// <summary>
    /// Loads Audio Settings from file
    /// </summary>
    public static void LoadFromFile()
    {
        if (loadedOnce)
        {
            return;
        }
        loadedOnce = true;
        //Debug.Log("Loading Settings");

        LoadFromFilePlayerPref();
        return;

        var pData = XMLSerie.ReadXMLProgram();

        Settings.ISSoundOn        = pData.SoundIsOn;
        Settings.ISMusicOn        = pData.MusicIsOn;
        AudioCollector.SoundLevel = pData.SoundLevel;
        AudioCollector.MusicLevel = pData.MusicLevel;
        Unit.Units    = pData.Units;
        _autoSaveFrec = pData.AutoSaveFrec;
        //in case was deleted or somehting
        if (_autoSaveFrec < 300)
        {
            _autoSaveFrec = 300;
        }

        QualitySettings.SetQualityLevel(pData.QualityLevel);
        Screen.fullScreen = pData.isFullScreen;
        Languages.SetCurrentLang(pData.Lang);
        //in case was deleted or somehting
        if (string.IsNullOrEmpty(Languages.CurrentLang()))
        {
            Languages.SetCurrentLang("English");
        }
    }
Esempio n. 4
0
    static List <string> GetFilesInStandAlone()
    {
        var pData = XMLSerie.ReadXMLProgram();

        //needs to contain the current lang and the type of person
        var res = pData.Voices;

        return(res);
    }
Esempio n. 5
0
    ProgramData CreateProgramDataObjOrUpdate()
    {
        //reads the Program.xls
        var pData = XMLSerie.ReadXMLProgram();

        if (pData == null)
        {
            ProgramData p = new ProgramData(Version());
            return(p);
        }

        pData.GameVersion = Version();
        return(pData);
    }
Esempio n. 6
0
    private static List <string> GetFilesInStandAlone()
    {
        var pData = XMLSerie.ReadXMLProgram();

        return(pData.Waves);
    }