Files
zeling_v2/Assets/_Game/Scripts/World/Map/MinimapInputHandler.cs
Joywayer f74d7f1877 Add independent review reports for Minimap system (Rounds 8, 9, and 26)
- Round 8 report highlights improvements in architecture, editor usability, and data robustness, with a total score of 80/100.
- Round 9 report focuses on editor extension capabilities, identifying issues with room data indexing and layout editing, resulting in a score of 76/100.
- Round 26 report evaluates the system against commercial standards, noting new issues and confirming previous fixes, with a score of 95.8/100.
2026-05-25 23:15:12 +08:00

39 lines
1.2 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
using UnityEngine;
using BaseGames.Input;
namespace BaseGames.World.Map
{
/// <summary>
/// 小地图 HUD 输入处理器R13-N3
/// 挂在与 MinimapHUD 相同的 GameObject 上,负责将 InputReaderSO 事件路由到 MinimapHUD。
/// <list type="bullet">
/// <item>CycleMinimapZoomEvent → MinimapHUD.CycleZoom()(循环切换视野半径档位)</item>
/// </list>
/// 输入动作在 InputActionAsset 的 UI Map 中命名为 "CycleMinimapZoom"
/// 若动作不存在InputReaderSO 会打印 Warning 并安全跳过,不影响运行。
/// </summary>
[RequireComponent(typeof(MinimapHUD))]
public class MinimapInputHandler : MonoBehaviour
{
[SerializeField] private InputReaderSO _inputReader;
private MinimapHUD _hud;
private void Awake() => _hud = GetComponent<MinimapHUD>();
private void OnEnable()
{
if (_inputReader != null)
_inputReader.CycleMinimapZoomEvent += OnCycleZoom;
}
private void OnDisable()
{
if (_inputReader != null)
_inputReader.CycleMinimapZoomEvent -= OnCycleZoom;
}
private void OnCycleZoom() => _hud?.CycleZoom();
}
}