Add blackjack dialog triggers and dialogue data

This commit is contained in:
dldydtn9755-crypto
2026-06-23 17:27:20 +09:00
parent 86e1b4ac24
commit f4dcfdec8a
17 changed files with 1672 additions and 5 deletions

View File

@@ -66,7 +66,11 @@ private string ResolveRegion()
}
// 영역 전환 (DialogRegion 트리거가 호출). 다음 Play()부터 해당 영역 대화가 재생됨.
public void SetRegion(string region) => _currentRegion = region;
public void SetRegion(string region)
{
Debug.Log($"[DialogPlayer] {gameObject.name} SetRegion: {_currentRegion} -> {region}");
_currentRegion = region;
}
public string CurrentRegion => _currentRegion;

View File

@@ -0,0 +1,34 @@
using UnityEngine;
[RequireComponent(typeof(Collider))]
public class BlackjackNpcRegionTrigger : MonoBehaviour
{
[Header("Target NPC")]
public Transform targetNpcRoot;
public DialogPlayer targetDialogPlayer;
[Header("Region")]
public string regionKey = "Area2";
private void Reset()
{
Collider col = GetComponent<Collider>();
if (col != null)
col.isTrigger = true;
}
private void OnTriggerEnter(Collider other)
{
if (targetDialogPlayer == null || targetNpcRoot == null)
{
Debug.LogWarning("[BlackjackNpcRegionTrigger] Target missing: " + gameObject.name);
return;
}
if (other.transform == targetNpcRoot || other.transform.IsChildOf(targetNpcRoot))
{
targetDialogPlayer.SetRegion(regionKey);
Debug.Log("[BlackjackNpcRegionTrigger] Set Hook Region: " + regionKey);
}
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 2c59f75021b6ffd4a9e401977eab2215

View File

@@ -0,0 +1,22 @@
using UnityEngine;
public class BlackjackSetDialogRegion : MonoBehaviour
{
[Header("Target Dialog Player")]
public DialogPlayer targetDialogPlayer;
[Header("Region")]
public string regionKey = "Area2";
public void SetRegion()
{
if (targetDialogPlayer == null)
{
Debug.LogWarning("[BlackjackSetDialogRegion] Target DialogPlayer is missing.");
return;
}
targetDialogPlayer.SetRegion(regionKey);
Debug.Log("[BlackjackSetDialogRegion] Set Region: " + regionKey);
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: cb97f33d4f1f90d45842cf1c2258fa83