摄像机区域的架构改动

This commit is contained in:
2026-05-15 14:47:24 +08:00
parent 1b37297585
commit f264329751
3591 changed files with 1687228 additions and 446503 deletions

View File

@@ -0,0 +1,23 @@
using UnityEngine;
namespace BaseGames.World
{
/// <summary>
/// 幻影可交互机关。继承 DirectionalInteractable额外响应 PhantomBody 层(太虚斩形态)。
/// </summary>
public class PhantomInteractable : DirectionalInteractable
{
private int _phantomBodyLayer;
private void Awake() => _phantomBodyLayer = LayerMask.NameToLayer("PhantomBody");
private void OnTriggerEnter2D(Collider2D other)
{
bool isPlayer = other.CompareTag("Player");
bool isPhantom = other.gameObject.layer == _phantomBodyLayer;
if (!isPlayer && !isPhantom) return;
TryActivate();
}
}
}