Add WeaponFeedback component and AddressableManagerWindow meta file

- Implemented WeaponFeedback class for handling weapon-related feedbacks such as hit effects and attack sounds.
- Added meta file for AddressableManagerWindow to manage addressable assets.
- Included a new jump.data file for profiler data.
This commit is contained in:
2026-05-22 22:03:32 +08:00
parent 3e1f234ddc
commit b7baf7ad6a
44 changed files with 1783 additions and 1927 deletions

View File

@@ -57,9 +57,14 @@ namespace BaseGames.Camera
// ── 静态:跨实例共享触发状态 ──────────────────────────────────────────
// 玩家当前物理上所在的所有触发区域(按进入顺序排列)
private static readonly List<CameraTriggerZone> s_InsideZones = new();
// 场景内所有已启用的触发区域,供 RoomController 等查询(替代 FindObjectsOfType
private static readonly List<CameraTriggerZone> s_AllZones = new();
// 当前已向 ICameraService 发出 SwitchArea 请求的触发区域
private static CameraTriggerZone s_ActiveZone;
/// <summary>场景内当前所有已启用的触发区域(只读)。</summary>
public static IReadOnlyList<CameraTriggerZone> AllZones => s_AllZones;
/// <summary>
/// 在每次进入 Play Mode 前(或禁用 Domain Reload 时的跨会话)重置静态状态,
/// 防止上一次游戏会话残留的区域引用导致触发逻辑错误。
@@ -68,6 +73,7 @@ namespace BaseGames.Camera
private static void ResetStaticState()
{
s_InsideZones.Clear();
s_AllZones.Clear();
s_ActiveZone = null;
}
@@ -77,12 +83,22 @@ namespace BaseGames.Camera
_collider.isTrigger = true;
}
private void OnEnable()
{
if (Application.isPlaying)
s_AllZones.Add(this);
}
private void OnDisable()
{
if (!Application.isPlaying) return;
s_AllZones.Remove(this);
HandlePlayerExit();
}
/// <summary>判断世界坐标点是否在本触发区域多边形内(供 RoomController 等无需 GetComponent 直接查询)。</summary>
public bool ContainsPoint(Vector2 worldPoint) => _collider != null && _collider.OverlapPoint(worldPoint);
/// <summary>
/// 若玩家出生时已在触发区域内OnTriggerEnter2D 不会触发。
/// 延迟一帧(确保 RoomController.Start 先完成基准区域设置)后主动检测。