(client) feat:实现热重载,实现多维度,实现武器,实现掉落物,实现状态UI,实现攻击AI (#44)

Co-authored-by: zzdxxz <2079238449@qq.com>
Co-committed-by: zzdxxz <2079238449@qq.com>
This commit is contained in:
2025-08-27 19:56:49 +08:00
committed by TheRedApricot
parent d91210a6ff
commit 8456b6c162
132 changed files with 18568 additions and 2534 deletions

View File

@ -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()
{