Projext/Assets/Scripts/Obsession/BossRoomTrigger.cs

19 lines
548 B
C#
Raw Normal View History

2026-02-10 08:04:33 +00:00
using UnityEngine;
public class BossRoomTrigger : MonoBehaviour
{
private void OnTriggerEnter(Collider other)
{
if (other.CompareTag("Player"))
{
// ★ 보스 방에 처음 들어가면 보너스 XP
if (ObsessionSystem.instance != null)
{
ObsessionSystem.instance.AddRunXP(50); // 보스 도달 보너스
Debug.Log("보스 방 도달! +50XP 보너스 획득!");
}
Destroy(this); // 한 번만 주고 제거
}
}
}