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

@@ -39,6 +39,8 @@ namespace BaseGames.Camera
[SerializeField] private CinemachineBrain _brain;
private UnityEngine.Camera _camera;
private CinemachineCamera _cachedVCam;
private CinemachineConfiner3D _cachedConfiner;
private void Reset()
{
@@ -77,7 +79,8 @@ namespace BaseGames.Camera
/// <summary>
/// 获取当前活跃 VCam 的 CinemachineConfiner3D 边界盒(世界空间 AABB
/// 用于在像素取整后将相机钳制回限位区域内。
/// 缓存上次查询的 VCam 实例;仅在活跃 VCam 发生切换时重新调用 GetComponent
/// 避免每帧 GetComponent 开销。
/// </summary>
private bool TryGetActiveConfinerBounds(out Bounds bounds)
{
@@ -85,9 +88,14 @@ namespace BaseGames.Camera
if (_brain == null) return false;
var vcam = _brain.ActiveVirtualCamera as CinemachineCamera;
if (vcam == null) return false;
var confiner = vcam.GetComponent<CinemachineConfiner3D>();
if (confiner == null || !confiner.IsValid) return false;
bounds = confiner.BoundingVolume.bounds;
// 只在活跃 VCam 切换时刷新缓存
if (!ReferenceEquals(vcam, _cachedVCam))
{
_cachedVCam = vcam;
_cachedConfiner = vcam.GetComponent<CinemachineConfiner3D>();
}
if (_cachedConfiner == null || !_cachedConfiner.IsValid) return false;
bounds = _cachedConfiner.BoundingVolume.bounds;
return true;
}