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

@@ -1,4 +1,5 @@
using System.Collections.Generic;
using BaseGames.Core.Events;
using UnityEngine;
namespace BaseGames.World
@@ -14,17 +15,25 @@ namespace BaseGames.World
[SerializeField, Min(1)] private int _maxCrumbs = 20;
[SerializeField, Min(0.1f)] private float _minMoveDistance = 1f;
private readonly Queue<Vector2> _crumbs = new();
private Vector2 _lastPos;
private float _timer;
[Header("事件频道")]
[SerializeField] private TransformEventChannelSO _onPlayerSpawned;
private readonly Queue<Vector2> _crumbs = new();
private readonly CompositeDisposable _subs = new();
private Vector2 _lastPos;
private float _timer;
private Transform _playerTransform;
// ── Unity 生命周期 ────────────────────────────────────────────────
private void Awake()
private void OnEnable()
{
var go = GameObject.FindWithTag("Player");
if (go != null) _playerTransform = go.transform;
_onPlayerSpawned?.Subscribe(t => _playerTransform = t).AddTo(_subs);
}
private void OnDisable()
{
_subs.Clear();
}
private void Update()