コード例 #1
0
ファイル: GameSettings.cs プロジェクト: mecha-rm/GDW_Y3-PJT
    // saves the game settings
    public void SaveSettings()
    {
        // uses the metric logger to save the settings
        MetricsLogger prefLog = new MetricsLogger();

        // adjusts the volume
        // TODO: maybe move this function or put it into this game settings file.
        SettingsInterface.AdjustVolume();

        // Saving Content to Fle
        // sets the logger file
        prefLog.SetLoggerFile(FILE_NAME);

        // TODO: add function to metrics to see if the file exists.
        // see what happens if the file isn't there.

        // adds the contents
        // master volume
        prefLog.AddMetricToLogger(LBL_MASTER_VOL, masterVolume);

        // bgm volume
        prefLog.AddMetricToLogger(LBL_BGM_VOL, bgmVolume);

        // sound effects
        prefLog.AddMetricToLogger(LBL_SFX_VOL, sfxVolume);

        // saves the data
        prefLog.SaveMetrics();
    }