多轮审查评估

This commit is contained in:
2026-05-13 09:19:54 +08:00
parent 458f344e83
commit 1b37297585
57 changed files with 3019 additions and 218 deletions

View File

@@ -1,46 +1,49 @@
using UnityEngine;
using BaseGames.Core.Events;
/// <summary>
/// 无障碍设置数据 SO架构 16_SupportingModules §6
/// 包含屏幕抖动、闪光减弱、色盲模式等辅助功能开关。
/// </summary>
[CreateAssetMenu(menuName = "Settings/AccessibilitySettings", fileName = "SET_Accessibility")]
public class AccessibilitySettingsSO : ScriptableObject
namespace BaseGames.Support.Accessibility
{
private const string PrefsPrefix = "accessibility_";
[Header("屏幕体感")]
public bool ScreenShake = true;
public bool ReducedFlash = false;
[Header("色盲模式")]
public ColorblindMode ColorblindMode = ColorblindMode.None;
[Header("文字与 UI")]
public bool LargeText = false;
public bool HighContrast = false;
public float UIScale = 1f;
// ── 持久化 ──────────────────────────────────────────────────────────────
public void Save()
/// <summary>
/// 无障碍设置数据 SO架构 16_SupportingModules §6
/// 包含屏幕抖动、闪光减弱、色盲模式等辅助功能开关。
/// </summary>
[CreateAssetMenu(menuName = "Settings/AccessibilitySettings", fileName = "SET_Accessibility")]
public class AccessibilitySettingsSO : ScriptableObject
{
PlayerPrefs.SetInt (PrefsPrefix + "ScreenShake", ScreenShake ? 1 : 0);
PlayerPrefs.SetInt (PrefsPrefix + "ReducedFlash", ReducedFlash ? 1 : 0);
PlayerPrefs.SetInt (PrefsPrefix + "ColorblindMode",(int)ColorblindMode);
PlayerPrefs.SetInt (PrefsPrefix + "LargeText", LargeText ? 1 : 0);
PlayerPrefs.SetInt (PrefsPrefix + "HighContrast", HighContrast ? 1 : 0);
PlayerPrefs.SetFloat (PrefsPrefix + "UIScale", UIScale);
PlayerPrefs.Save();
}
private const string PrefsPrefix = "accessibility_";
public void Load()
{
ScreenShake = PlayerPrefs.GetInt (PrefsPrefix + "ScreenShake", 1) == 1;
ReducedFlash = PlayerPrefs.GetInt (PrefsPrefix + "ReducedFlash", 0) == 1;
ColorblindMode = (ColorblindMode)PlayerPrefs.GetInt(PrefsPrefix + "ColorblindMode", 0);
LargeText = PlayerPrefs.GetInt (PrefsPrefix + "LargeText", 0) == 1;
HighContrast = PlayerPrefs.GetInt (PrefsPrefix + "HighContrast", 0) == 1;
UIScale = PlayerPrefs.GetFloat(PrefsPrefix + "UIScale", 1f);
[Header("屏幕体感")]
public bool ScreenShake = true;
public bool ReducedFlash = false;
[Header("色盲模式")]
public ColorblindMode ColorblindMode = ColorblindMode.None;
[Header("文字与 UI")]
public bool LargeText = false;
public bool HighContrast = false;
public float UIScale = 1f;
// ── 持久化 ──────────────────────────────────────────────────────────────
public void Save()
{
PlayerPrefs.SetInt (PrefsPrefix + "ScreenShake", ScreenShake ? 1 : 0);
PlayerPrefs.SetInt (PrefsPrefix + "ReducedFlash", ReducedFlash ? 1 : 0);
PlayerPrefs.SetInt (PrefsPrefix + "ColorblindMode",(int)ColorblindMode);
PlayerPrefs.SetInt (PrefsPrefix + "LargeText", LargeText ? 1 : 0);
PlayerPrefs.SetInt (PrefsPrefix + "HighContrast", HighContrast ? 1 : 0);
PlayerPrefs.SetFloat (PrefsPrefix + "UIScale", UIScale);
PlayerPrefs.Save();
}
public void Load()
{
ScreenShake = PlayerPrefs.GetInt (PrefsPrefix + "ScreenShake", 1) == 1;
ReducedFlash = PlayerPrefs.GetInt (PrefsPrefix + "ReducedFlash", 0) == 1;
ColorblindMode = (ColorblindMode)PlayerPrefs.GetInt(PrefsPrefix + "ColorblindMode", 0);
LargeText = PlayerPrefs.GetInt (PrefsPrefix + "LargeText", 0) == 1;
HighContrast = PlayerPrefs.GetInt (PrefsPrefix + "HighContrast", 0) == 1;
UIScale = PlayerPrefs.GetFloat(PrefsPrefix + "UIScale", 1f);
}
}
}

View File

@@ -3,6 +3,8 @@ using UnityEngine.Rendering;
using UnityEngine.Rendering.Universal;
using BaseGames.Core.Events;
namespace BaseGames.Support.Accessibility
{
/// <summary>
/// 色盲滤镜 URP Renderer Feature架构 16_SupportingModules §6.2)。
/// 通过颜色矩阵将画面转换到对应色盲友好的色彩空间。
@@ -135,3 +137,4 @@ public class ColorBlindFilter : ScriptableRendererFeature
new Vector4(0, 0, 0, 1));
}
}
}

View File

@@ -3,7 +3,7 @@ using BaseGames.World;
using BaseGames.Player;
using BaseGames.Core.Save;
namespace BaseGames.Progression
namespace BaseGames.Support.AntiSoftlock
{
/// <summary>
/// 硬性能力门禁(架构 16_SupportingModules §5.3)。

View File

@@ -1,7 +1,7 @@
using UnityEngine;
using BaseGames.Player;
namespace BaseGames.Progression
namespace BaseGames.Support.AntiSoftlock
{
/// <summary>
/// 房间逃脱信息 SO架构 16_SupportingModules §5.2)。