update UI

This commit is contained in:
manhduyhoang90
2026-06-06 00:00:27 +07:00
parent f761a53194
commit 763f933c2e
4 changed files with 132 additions and 211 deletions

View File

@@ -45,7 +45,18 @@ public class LaserProjectile : MonoBehaviour
return;
}
// KIỂM TRA LAYER "GROUND"
if (other.gameObject.layer == LayerMask.NameToLayer("Ground"))
{
Debug.Log("<color=yellow>Laser hit GROUND layer.</color>");
Impact();
return;
}
// Phá hủy đạn nếu trúng tường, sàn nhà (mọi thứ không phải trigger khác)
// 2. Phá hủy đạn nếu trúng Ground, Tường, hoặc bất kỳ vật thể đặc nào (không phải Trigger)
if (!other.isTrigger)
{
Debug.Log($"Laser hit solid object: {other.name} (Ground/Obstacle). Destroying.");