多轮审查评估

This commit is contained in:
2026-05-13 09:19:54 +08:00
parent 458f344e83
commit 1b37297585
57 changed files with 3019 additions and 218 deletions

View File

@@ -7,10 +7,14 @@ namespace BaseGames.World
/// </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 == LayerMask.NameToLayer("PhantomBody");
bool isPhantom = other.gameObject.layer == _phantomBodyLayer;
if (!isPlayer && !isPhantom) return;
TryActivate();