效果模块,以及代码位置整理
This commit is contained in:
32
Assets/Scripts/Settings/EditorSettings.cs
Normal file
32
Assets/Scripts/Settings/EditorSettings.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
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 musicVolume = 100;
|
||||
public int soundFXVolume = 100;
|
||||
|
||||
public EditorSettings(int autoSaveInterval, int musicVolume, int soundFXVolume)
|
||||
{
|
||||
this.autoSaveInterval = autoSaveInterval;
|
||||
this.musicVolume = musicVolume;
|
||||
this.soundFXVolume = soundFXVolume;
|
||||
}
|
||||
|
||||
public static void SaveSettings(EditorSettings settings)
|
||||
{
|
||||
ES3.Save("EditorSettings", settings, Application.streamingAssetsPath + "/EditorSettings.es3");
|
||||
}
|
||||
|
||||
public static void LoadSettings(ref EditorSettings settings)
|
||||
{
|
||||
settings = ES3.Load<EditorSettings>("EditorSettings", Application.streamingAssetsPath + "/EditorSettings.es3");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user