(client) feat:实现热重载,实现多维度,实现武器,实现掉落物,实现状态UI,实现攻击AI (#44)
Co-authored-by: zzdxxz <2079238449@qq.com> Co-committed-by: zzdxxz <2079238449@qq.com>
This commit is contained in:
@ -11,10 +11,11 @@ namespace Base
|
||||
[System.Serializable]
|
||||
public class GameSettings
|
||||
{
|
||||
public float progressStepDuration = 1f;
|
||||
public float exitAnimationDuration = 2f;
|
||||
public float progressStepDuration = 0.5f;
|
||||
public float exitAnimationDuration = 1f;
|
||||
public bool developerMode = false;
|
||||
public bool friendlyFire = false;
|
||||
public bool showMiniMap = true;
|
||||
public float globalVolume = 1.0f;
|
||||
public WindowMode currentWindowMode = WindowMode.Fullscreen;
|
||||
public Vector2Int windowResolution = new(1920, 1080);
|
||||
@ -47,7 +48,7 @@ namespace Base
|
||||
|
||||
public void SaveSettings()
|
||||
{
|
||||
string json = JsonConvert.SerializeObject(CurrentSettings);
|
||||
var json = JsonConvert.SerializeObject(CurrentSettings);
|
||||
PlayerPrefs.SetString("GameSettings", json);
|
||||
PlayerPrefs.Save();
|
||||
}
|
||||
@ -55,7 +56,7 @@ namespace Base
|
||||
{
|
||||
if (PlayerPrefs.HasKey("GameSettings"))
|
||||
{
|
||||
string json = PlayerPrefs.GetString("GameSettings");
|
||||
var json = PlayerPrefs.GetString("GameSettings");
|
||||
CurrentSettings = JsonConvert.DeserializeObject<GameSettings>(json);
|
||||
}
|
||||
|
||||
@ -64,6 +65,11 @@ namespace Base
|
||||
ApplyWindowSettings();
|
||||
}
|
||||
|
||||
public void Apply()
|
||||
{
|
||||
ApplyAudioSettings();
|
||||
ApplyWindowSettings();
|
||||
}
|
||||
// 应用音频设置
|
||||
private void ApplyAudioSettings()
|
||||
{
|
||||
|
Reference in New Issue
Block a user