v10 全量评审:修复 TD-06 至 TD-12(InputReader 移除资产扫描回退 / EmergencySave 解除 LocalFileStorage 直接依赖 / AccessibilityManager 注册 IAccessibilityService / HUDController HP/SpringIcon SetActive 复用 / MovingPlatform 缓存 WaitForSeconds / RewardSO IRewardTarget 解耦 Quest←Player 依赖 / CrashReporter 频率限制崩溃日志)

This commit is contained in:
2026-05-12 16:18:46 +08:00
parent ebbbb7332e
commit 9284278578
27 changed files with 1697 additions and 125 deletions

View File

@@ -79,7 +79,8 @@ namespace BaseGames.Input
private void OnEnable()
{
Debug.Assert(_onPauseRequested != null,
"[InputReaderSO] _onPauseRequested 未赋值,请在 Inspector 中指定 EVT_PauseRequested。", this);
// Reset private state on every OnEnable so stale ScriptableObject
// references from a previous Play session don't cause
// 'Map must be contained in state' errors.
@@ -200,36 +201,10 @@ namespace BaseGames.Input
private void HandlePause()
{
if (_onPauseRequested == null)
{
_onPauseRequested = FindPauseChannelByName();
if (_onPauseRequested == null)
Debug.LogError("[InputReaderSO.HandlePause] Could not find EVT_PauseRequested asset!");
}
PauseEvent?.Invoke();
_onPauseRequested?.Raise();
}
private static VoidEventChannelSO FindPauseChannelByName()
{
VoidEventChannelSO[] channels = Resources.FindObjectsOfTypeAll<VoidEventChannelSO>();
foreach (VoidEventChannelSO channel in channels)
{
if (channel != null && channel.name == "EVT_PauseRequested")
return channel;
}
return null;
}
private static void BindStarted(InputActionMap map, string name, Action callback)
{
var action = map.FindAction(name, throwIfNotFound: false);