38 lines
1.3 KiB
C#
38 lines
1.3 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using Ichni.RhythmGame;
|
|
using Ichni.RhythmGame.Beatmap;
|
|
using UnityEngine;
|
|
|
|
namespace Ichni.Editor
|
|
{
|
|
public class EditorSettings
|
|
{
|
|
public int autoSaveInterval = 300;
|
|
public int maximumAutoSaveCount = 3;
|
|
public int musicVolume = 100;
|
|
public int soundFXVolume = 100;
|
|
public int frameRate = 60;
|
|
|
|
|
|
public EditorSettings(int autoSaveInterval, int maximumAutoSaveCount, int musicVolume, int soundFXVolume, int frameRate)
|
|
{
|
|
this.autoSaveInterval = autoSaveInterval;
|
|
this.maximumAutoSaveCount = maximumAutoSaveCount;
|
|
this.musicVolume = musicVolume;
|
|
this.soundFXVolume = soundFXVolume;
|
|
this.frameRate = frameRate;
|
|
}
|
|
|
|
public static void SaveSettings(EditorSettings settings)
|
|
{
|
|
ES3.Save("EditorSettings", settings, Application.persistentDataPath + "/EditorSettings.es3");
|
|
}
|
|
|
|
public static void LoadSettings(ref EditorSettings settings)
|
|
{
|
|
settings = ES3.Load("EditorSettings", Application.persistentDataPath + "/EditorSettings.es3",
|
|
new EditorSettings(300, 3, 100, 100, 60));
|
|
}
|
|
}
|
|
} |