diff --git a/Assets/01_Scenes/WhaleAdventure_VR/Rooms/CatsRoom.unity b/Assets/01_Scenes/WhaleAdventure_VR/Rooms/CatsRoom.unity index 2cc7aafd..ec9aea67 100644 --- a/Assets/01_Scenes/WhaleAdventure_VR/Rooms/CatsRoom.unity +++ b/Assets/01_Scenes/WhaleAdventure_VR/Rooms/CatsRoom.unity @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:24f0eb11bbe93eb71cf802da326ac5f10bac6ae20bb323ee715af65bbcbecd3a -size 2093949 +oid sha256:3e993d84b19afa541a1e9c312a9a0dc191d2cd7b277ec1f367ba017e22990123 +size 2108376 diff --git a/Assets/02_Scripts/Communication/Dialog/DialogChoice.cs b/Assets/02_Scripts/Communication/Dialog/DialogChoice.cs index f13ceb6f..7bb82adf 100644 --- a/Assets/02_Scripts/Communication/Dialog/DialogChoice.cs +++ b/Assets/02_Scripts/Communication/Dialog/DialogChoice.cs @@ -5,4 +5,5 @@ public class DialogChoice { public DialogNode DestinationNode; public string ChoiceText; + public string Code; // 선택 시 기록/식별용 코드 (선택 입력, 영문 권장) } diff --git a/Assets/02_Scripts/Communication/Dialog/DialogNode.cs b/Assets/02_Scripts/Communication/Dialog/DialogNode.cs index d576f72c..c3fbcd60 100644 --- a/Assets/02_Scripts/Communication/Dialog/DialogNode.cs +++ b/Assets/02_Scripts/Communication/Dialog/DialogNode.cs @@ -21,6 +21,7 @@ public class DialogNode : ScriptableObject [Header("Behavior")] public bool LookAtPlayer; + public bool WaitForInput; // true면 LineDuration 무시하고 B버튼(OnDialogNext) 입력까지 대기 [Header("Flow")] public DialogNode Next; // 선택지 없을 때 자동으로 갈 노드 @@ -28,4 +29,7 @@ public class DialogNode : ScriptableObject [Header("ChoiceQuestion")] [TextArea(2,5)] public string ChoiceQuestion; + + [Header("Event")] + public string EventKey; // 비어있지 않으면 이 노드가 재생될 때 DialogPlayer가 같은 Key의 이벤트를 호출 } diff --git a/Assets/02_Scripts/Communication/Dialog/DialogPlayer.cs b/Assets/02_Scripts/Communication/Dialog/DialogPlayer.cs index dc4b620a..14e7ee8e 100644 --- a/Assets/02_Scripts/Communication/Dialog/DialogPlayer.cs +++ b/Assets/02_Scripts/Communication/Dialog/DialogPlayer.cs @@ -1,4 +1,6 @@ +using System; using System.Collections.Generic; +using UnityEngine.Events; using UnityEngine.InputSystem; using UnityEngine; @@ -12,6 +14,18 @@ public struct RegionGroup public DialogGroup Group; } + // 마지막 선택지 코드(LastChoiceCode)를 인자로 넘기는 UnityEvent (인스펙터 노출용 구체 타입) + [System.Serializable] + public class ChoiceCodeEvent : UnityEvent { } + + // 노드의 EventKey ↔ 그 노드 재생 시 호출할 이벤트. 인자로 LastChoiceCode가 전달됨. + [System.Serializable] + public struct NodeEvent + { + public string Key; + public ChoiceCodeEvent Event; + } + [Tooltip("영역 이름 ↔ 그 영역에서 재생할 DialogGroup")] [SerializeField] private List _regionGroups; @@ -23,6 +37,10 @@ public struct RegionGroup [SerializeField] private float _hudForwardOffset = 0.5f; // 화자→플레이어 방향으로 띄울 거리 [SerializeField] private float _hudLateralOffset = 0f; // 좌우 오프셋 (+ 플레이어 시점 오른쪽) + [Header("Dialog Events")] + [Tooltip("노드의 Event Key와 같은 Key가 그 노드 재생 시 호출됨")] + [SerializeField] private List _nodeEvents = new(); + private Dictionary _regionMap; private Animator _animator; private int _initialGestureHash; @@ -31,6 +49,11 @@ public struct RegionGroup private readonly Dictionary _originalRotations = new(); public bool IsPlaying { get; private set; } + // 마지막으로 고른 선택지 (인덱스/코드). DialogVariables에도 lastChoiceIndex / lastChoiceCode 로 저장됨 + public int LastChoiceIndex { get; private set; } = -1; + public string LastChoiceCode { get; private set; } + public event Action OnChoiceSelected; // (index, code) + private void Awake() { _regionMap = new Dictionary(); @@ -90,6 +113,7 @@ public async Awaitable Play(string region) if (node.Choices != null && node.Choices.Count > 0) { int picked = await WaitForChoice(node); + RecordChoice(node, picked); node = node.Choices[picked].DestinationNode; } else @@ -169,6 +193,8 @@ private async Awaitable PlayNode(DialogNode node) if (DialogHud.Instance != null) DialogHud.Instance.Show(node.Speaker, node.TalkText, _hudChestHeight, _hudForwardOffset, _hudLateralOffset); + RaiseNodeEvent(node.EventKey); // EventKey 있으면 매칭 이벤트 호출 + // 보이스 재생 if (node.Voice != null && node.Speaker != null) { @@ -193,17 +219,47 @@ private async Awaitable PlayNode(DialogNode node) if (node.Expression != null) _animator.CrossFade(node.Expression.StateName, node.Expression.CrossFadeDuration, node.Expression.AnimationLayer); - // 대기 시간 결정 - float wait = 0f; - if (node.Voice != null && node.Voice.Clip != null) - wait = node.Voice.Clip.length; + // 진행 방식 결정 + if (node.WaitForInput) + { + await WaitForAdvanceInput(); // B버튼 입력이 있어야만 다음으로 + } else - wait = node.LineDuration; + { + float wait = (node.Voice != null && node.Voice.Clip != null) + ? node.Voice.Clip.length + : node.LineDuration; - if (wait > 0f) - await Awaitable.WaitForSecondsAsync(wait); - else - await WaitForAdvanceInput(); // 수동 진행 + if (wait > 0f) + await Awaitable.WaitForSecondsAsync(wait); + else + await WaitForAdvanceInput(); // 지정 시간이 없으면 입력으로 진행 + } + } + + // 노드의 EventKey와 같은 Key를 가진 이벤트들을 호출 + private void RaiseNodeEvent(string key) + { + if (string.IsNullOrEmpty(key)) return; + foreach (var e in _nodeEvents) + if (e.Key == key) e.Event?.Invoke(LastChoiceCode); // 마지막 선택지 코드를 인자로 전달 + } + + // 선택 결과 기록: 인덱스/코드를 프로퍼티 + DialogVariables에 저장하고 이벤트 발행 + private void RecordChoice(DialogNode node, int index) + { + string code = (node.Choices != null && index >= 0 && index < node.Choices.Count) + ? node.Choices[index].Code : null; + code = DialogVariables.Format(code); // {token} 치환 → 동적으로 생성된 코드 반영 + + LastChoiceIndex = index; + LastChoiceCode = code; + + DialogVariables.Set("lastChoiceIndex", index.ToString()); + if (!string.IsNullOrEmpty(code)) + DialogVariables.Set("lastChoiceCode", code); + + OnChoiceSelected?.Invoke(index, code); } private async Awaitable WaitForChoice(DialogNode node) @@ -219,10 +275,33 @@ private async Awaitable WaitForChoice(DialogNode node) } + // 대화 진행 입력(OnDialogNext = VR B버튼) 한 번을 대기 private async Awaitable WaitForAdvanceInput() { - // TODO: VR 컨트롤러 버튼 입력 대기. 일단은 1초 대기 - await Awaitable.WaitForSecondsAsync(1f); + var im = InputManager.Instance; + if (im == null) + { + // 입력 매니저 없으면 안전하게 잠깐 대기 후 진행 + await Awaitable.WaitForSecondsAsync(1f); + return; + } + + bool pressed = false; + void Handler() => pressed = true; + im.OnDialogNext_Event += Handler; + try + { + while (!pressed) + await Awaitable.NextFrameAsync(destroyCancellationToken); + } + catch (OperationCanceledException) + { + // 대기 중 오브젝트 파괴 시 조용히 종료 + } + finally + { + im.OnDialogNext_Event -= Handler; + } } //테스트용 diff --git a/Assets/02_Scripts/Communication/Dialog/DialogVariableSetter.cs b/Assets/02_Scripts/Communication/Dialog/DialogVariableSetter.cs new file mode 100644 index 00000000..1ddb9499 --- /dev/null +++ b/Assets/02_Scripts/Communication/Dialog/DialogVariableSetter.cs @@ -0,0 +1,12 @@ +using UnityEngine; + +// 인스펙터에 지정한 key로 DialogVariables에 값을 넣는 헬퍼. +// 예: TMP_InputField의 On End Edit(string) → 이 컴포넌트의 Set(string) 에 연결하면 +// 플레이어가 입력한 글자가 {key} 토큰으로 대화에 들어간다. +public class DialogVariableSetter : MonoBehaviour +{ + [SerializeField] private string _key; + + public void Set(string value) => DialogVariables.Set(_key, value); // UnityEvent 연결용 + public void SetKey(string key) => _key = key; +} diff --git a/Assets/02_Scripts/Communication/Dialog/DialogVariableSetter.cs.meta b/Assets/02_Scripts/Communication/Dialog/DialogVariableSetter.cs.meta new file mode 100644 index 00000000..ef010caf --- /dev/null +++ b/Assets/02_Scripts/Communication/Dialog/DialogVariableSetter.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 6f182cc352a11ed48b27e690bdb10520 \ No newline at end of file diff --git a/Assets/02_Scripts/Communication/Dialog/DialogVariables.cs b/Assets/02_Scripts/Communication/Dialog/DialogVariables.cs new file mode 100644 index 00000000..d20b16ce --- /dev/null +++ b/Assets/02_Scripts/Communication/Dialog/DialogVariables.cs @@ -0,0 +1,51 @@ +using System.Collections.Generic; +using System.Text; +using UnityEngine; + +// 대화 텍스트의 {key} 토큰을 런타임 값으로 치환하는 전역 저장소. +// 예) DialogVariables.Set("playerName", "철수"); +// 대사 "안녕 {playerName}!" → "안녕 철수!" +// +// 표시 직전(DialogHud / ChoiceHud)에서 Format()을 거치므로, 그래프엔 그냥 {key}만 써두면 된다. +public static class DialogVariables +{ + private static readonly Dictionary _values = new(); + + public static void Set(string key, string value) => _values[key] = value ?? string.Empty; + public static void Remove(string key) => _values.Remove(key); + public static void Clear() => _values.Clear(); + public static bool TryGet(string key, out string value) => _values.TryGetValue(key, out value); + + // "{key}" 토큰을 등록된 값으로 치환. 등록 안 된 키는 그대로 둔다(빠진 값 디버깅용). + public static string Format(string text) + { + if (string.IsNullOrEmpty(text) || text.IndexOf('{') < 0) return text; + + var sb = new StringBuilder(text.Length); + int i = 0; + while (i < text.Length) + { + if (text[i] == '{') + { + int close = text.IndexOf('}', i + 1); + if (close > i) + { + string key = text.Substring(i + 1, close - i - 1); + if (_values.TryGetValue(key, out var val)) + { + sb.Append(val); + i = close + 1; + continue; + } + } + } + sb.Append(text[i]); + i++; + } + return sb.ToString(); + } + + // 플레이 시작마다 초기화 (Enter Play Mode에서 도메인 리로드를 꺼도 이전 값이 안 남게) + [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.SubsystemRegistration)] + private static void ResetOnPlay() => _values.Clear(); +} diff --git a/Assets/02_Scripts/Communication/Dialog/DialogVariables.cs.meta b/Assets/02_Scripts/Communication/Dialog/DialogVariables.cs.meta new file mode 100644 index 00000000..d971ff7a --- /dev/null +++ b/Assets/02_Scripts/Communication/Dialog/DialogVariables.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: f6bb90f809bd62e409383e02949f32c3 \ No newline at end of file diff --git a/Assets/02_Scripts/Communication/Dialog/GraphTool/Editor/DialogGraphImporter.cs b/Assets/02_Scripts/Communication/Dialog/GraphTool/Editor/DialogGraphImporter.cs index f2f10c30..237002a9 100644 --- a/Assets/02_Scripts/Communication/Dialog/GraphTool/Editor/DialogGraphImporter.cs +++ b/Assets/02_Scripts/Communication/Dialog/GraphTool/Editor/DialogGraphImporter.cs @@ -81,6 +81,11 @@ public override void OnImportAsset(AssetImportContext ctx) dn.Voice = GetInputPortValue(gn.GetInputPortByName(DialogLineNode.PORT_VOICE)); dn.LineDuration = GetInputPortValue(gn.GetInputPortByName(DialogLineNode.PORT_DURATION)); dn.LookAtPlayer = GetInputPortValue(gn.GetInputPortByName(DialogLineNode.PORT_LOOKAT)); + dn.WaitForInput = GetInputPortValue(gn.GetInputPortByName(DialogLineNode.PORT_WAITINPUT)); + + string eventKey = null; + line.GetNodeOptionByName(DialogLineNode.OPTION_EVENT_KEY)?.TryGetValue(out eventKey); + dn.EventKey = eventKey; int choiceCount = 0; line.GetNodeOptionByName(DialogLineNode.OPTION_CHOICE_COUNT)?.TryGetValue(out choiceCount); @@ -96,10 +101,12 @@ public override void OnImportAsset(AssetImportContext ctx) for (int i = 0; i < choiceCount; i++) { var choiceText = GetInputPortValue(gn.GetInputPortByName(DialogLineNode.ChoiceTextPort(i))).Value; + var choiceCode = GetInputPortValue(gn.GetInputPortByName(DialogLineNode.ChoiceCodePort(i))); var dest = GetConnectedNode(gn, DialogLineNode.ChoiceOutPort(i)); dn.Choices.Add(new DialogChoice { ChoiceText = choiceText, + Code = choiceCode, DestinationNode = dest != null && map.TryGetValue(dest, out var destDn) ? destDn : null }); } diff --git a/Assets/02_Scripts/Communication/Dialog/GraphTool/Editor/DialogLineNode.cs b/Assets/02_Scripts/Communication/Dialog/GraphTool/Editor/DialogLineNode.cs index a6e2fcb4..61529c89 100644 --- a/Assets/02_Scripts/Communication/Dialog/GraphTool/Editor/DialogLineNode.cs +++ b/Assets/02_Scripts/Communication/Dialog/GraphTool/Editor/DialogLineNode.cs @@ -20,12 +20,15 @@ internal class DialogLineNode : DialogGraphNode public const string PORT_VOICE = "Voice"; public const string PORT_DURATION = "LineDuration"; public const string PORT_LOOKAT = "LookAtPlayer"; + public const string PORT_WAITINPUT = "WaitForInput"; public const string PORT_QUESTION = "ChoiceQuestion"; public const string OPTION_CHOICE_COUNT = "ChoiceCount"; + public const string OPTION_EVENT_KEY = "EventKey"; // 선택지별 포트 이름 규칙 (임포터와 공유) public static string ChoiceTextPort(int i) => $"Choice{i}Text"; + public static string ChoiceCodePort(int i) => $"Choice{i}Code"; public static string ChoiceOutPort(int i) => $"Choice{i}Out"; protected override void OnDefineOptions(IOptionDefinitionContext context) @@ -35,6 +38,11 @@ protected override void OnDefineOptions(IOptionDefinitionContext context) .WithTooltip("0이면 선형 진행(Next), 1 이상이면 가변 N지선다 분기") .WithDefaultValue(0) .Delayed(); + + context.AddOption(OPTION_EVENT_KEY) + .WithDisplayName("Event Key") + .WithTooltip("비우면 없음. 이 노드 재생 시 DialogPlayer의 같은 Key 이벤트 호출 (영문 키 권장)") + .Delayed(); } protected override void OnDefinePorts(IPortDefinitionContext context) @@ -49,6 +57,7 @@ protected override void OnDefinePorts(IPortDefinitionContext context) context.AddInputPort(PORT_VOICE).WithDisplayName("Voice").Build(); context.AddInputPort(PORT_DURATION).WithDisplayName("Line Duration").Build(); context.AddInputPort(PORT_LOOKAT).WithDisplayName("Look At Player").Build(); + context.AddInputPort(PORT_WAITINPUT).WithDisplayName("Wait For Input").Build(); int choiceCount = 0; GetNodeOptionByName(OPTION_CHOICE_COUNT)?.TryGetValue(out choiceCount); @@ -69,6 +78,9 @@ protected override void OnDefinePorts(IPortDefinitionContext context) context.AddInputPort(ChoiceTextPort(i)) .WithDisplayName($"Choice {i + 1} Text") .Build(); + context.AddInputPort(ChoiceCodePort(i)) + .WithDisplayName($"Choice {i + 1} Code") + .Build(); AddExecOutput(context, ChoiceOutPort(i), $"Choice {i + 1} →"); } } diff --git a/Assets/02_Scripts/Managers/GameClear.cs b/Assets/02_Scripts/Managers/GameClear.cs new file mode 100644 index 00000000..c0e7e3ee --- /dev/null +++ b/Assets/02_Scripts/Managers/GameClear.cs @@ -0,0 +1,107 @@ +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.AI; + +// 게임 클리어 시 처리: +// - NPC(오브젝트)들을 지정 위치로 재배치 +// - 대화 존(DialogRegion)들을 활성/비활성 전환 +// 리듬게임의 On Cleared 같은 UnityEvent에 OnGameClear()를 연결하면 한 번에 처리된다. +public class GameClear : MonoBehaviour +{ + [SerializeField] private RoomClearGateController _clearGate; + + // 옮길 오브젝트 ↔ 목적지(빈 Transform) 한 쌍 + [System.Serializable] + public struct Relocation + { + public GameObject Target; // 옮길 오브젝트 (NPC 등) + public Transform Destination; // 옮길 위치/회전 기준 + } + + // 클리어 시 적용할 존 상태 한 쌍 + [System.Serializable] + public struct ZoneState + { + public DialogRegion Zone; // 대상 존 + public bool Active; // 이 상태로 전환 + } + + [Header("NPC 재배치")] + [SerializeField] private List _relocations = new(); + + [Header("대화 존 상태")] + [SerializeField] private List _zoneStates = new(); + + // ── 클리어 시 한 번에 (UnityEvent 연결용) ───────────────────── + public void OnGameClear() + { + if(_clearGate != null) + { + //_clearGate.OpenClearGate(); + _clearGate.MarkRoomCleared(); + } + + Relocate(); + ApplyZoneStates(); + + SetClearDialogParameter(); + } + + // ── NPC 재배치 ─────────────────────────────────────────────── + // 리스트의 각 오브젝트를 지정 위치(위치+회전)로 이동. + public void Relocate() + { + foreach (var r in _relocations) + Relocate(r.Target, r.Destination); + } + + // 단일 오브젝트 재배치. NavMeshAgent가 있으면 Warp로 옮겨야 경로/내부상태가 안 깨진다. + public void Relocate(GameObject target, Transform destination) + { + if (target == null || destination == null) return; + + // 따라다니던 중이면 멈춰서 재배치 위치에 머물게 (다시 플레이어를 향해 가지 않도록) + if (target.TryGetComponent(out FollowObject follow) && follow.FollowEnabled) + follow.DisableFollow(); + + if (target.TryGetComponent(out NavMeshAgent agent) && agent.isOnNavMesh) + { + agent.Warp(destination.position); + target.transform.rotation = destination.rotation; + } + else + { + target.transform.SetPositionAndRotation(destination.position, destination.rotation); + } + } + + // ── 대화 존 활성/비활성 ────────────────────────────────────── + // 인스펙터에 설정한 _zoneStates를 한 번에 적용. + public void ApplyZoneStates() + { + foreach (var z in _zoneStates) + SetZoneActive(z.Zone, z.Active); + } + + // 특정 존을 활성/비활성 (존 오브젝트째로 토글 → 트리거도 같이 꺼짐). + public void SetZoneActive(DialogRegion zone, bool active) + { + if (zone != null) + zone.gameObject.SetActive(active); + } + + public void SetClearDialogParameter() + { + + //DialogVariables.Set("SpaceSceneName1", RandomSceneRouteManager.Instance.GetNextSceneName1()); + //DialogVariables.Set("SpaceSceneCode1", RandomSceneRouteManager.Instance.GetNextSceneCode1()); + //DialogVariables.Set("SpaceSceneName2", RandomSceneRouteManager.Instance.GetNextSceneName2()); + //DialogVariables.Set("SpaceSceneCode2", RandomSceneRouteManager.Instance.GetNextSceneCode2()); + + //테스트용 + DialogVariables.Set("SpaceSceneName1", "블랙잭"); + DialogVariables.Set("SpaceSceneCode1", "blackjack"); + DialogVariables.Set("SpaceSceneName2", "미로방"); + DialogVariables.Set("SpaceSceneCode2", "MazeRoom"); + } +} diff --git a/Assets/02_Scripts/Managers/GameClear.cs.meta b/Assets/02_Scripts/Managers/GameClear.cs.meta new file mode 100644 index 00000000..e99c5f1d --- /dev/null +++ b/Assets/02_Scripts/Managers/GameClear.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 22b271cf4093f3e458ae92b4a993272b \ No newline at end of file diff --git a/Assets/02_Scripts/Managers/InputManager.cs b/Assets/02_Scripts/Managers/InputManager.cs index a54032d2..f5e9bae8 100644 --- a/Assets/02_Scripts/Managers/InputManager.cs +++ b/Assets/02_Scripts/Managers/InputManager.cs @@ -12,6 +12,7 @@ public class InputManager : MonoBehaviour, GameInput.IPlayerActions // ─── 입력 이벤트들 (PlayerController 등이 구독) ────────────────────── public event Action OnJump_Event; // 한 번씩 (눌렀을 때) public event Action OnInteract_Event; // 상호작용 키 (앉기 등) — 눌렀을 때 한 번씩 + public event Action OnDialogNext_Event; // 대화 다음 진행 (VR B버튼) — 눌렀을 때 한 번씩 //키보드로 테스트용 public event Action OnKey_Left_Event; @@ -51,6 +52,12 @@ public void OnInteract(InputAction.CallbackContext ctx) OnInteract_Event?.Invoke(); } + public void OnDialogNext(InputAction.CallbackContext ctx) + { + if (ctx.phase == InputActionPhase.Started) + OnDialogNext_Event?.Invoke(); + } + public void OnKey_Left(InputAction.CallbackContext ctx) { if (ctx.phase == InputActionPhase.Started) diff --git a/Assets/02_Scripts/Managers/change room manager/RoomClearGateController.cs b/Assets/02_Scripts/Managers/change room manager/RoomClearGateController.cs index 408f7d93..6b6dd8e9 100644 --- a/Assets/02_Scripts/Managers/change room manager/RoomClearGateController.cs +++ b/Assets/02_Scripts/Managers/change room manager/RoomClearGateController.cs @@ -2,7 +2,7 @@ public class RoomClearGateController : MonoBehaviour { - [Header(" Ŭ Ʈ")] + [Header("�� Ŭ���� �� ���� ����Ʈ")] [SerializeField] private RoomExitGate exitGate; private bool isRoomCleared = false; @@ -10,20 +10,20 @@ public class RoomClearGateController : MonoBehaviour public bool IsRoomCleared => isRoomCleared; - // ¸ ȣ - // Լ Ʈ ٷ ʰ, " Ŭ Ϸ" ¸ + // ������ ���� �¸� �� ȣ�� + // �� �Լ��� ����Ʈ�� �ٷ� ���� �ʰ�, "�� Ŭ���� �Ϸ�" ���¸� ������ public void MarkRoomCleared() { isRoomCleared = true; - Debug.Log(" Ŭ Ϸ.  Ʈ ϴ."); + Debug.Log("�� Ŭ���� �Ϸ�. ���� �������� ���� ����Ʈ�� �����ϴ�."); } - //  ȣ + // �������� ���� �� ȣ�� public void OpenClearGate() { if (!isRoomCleared) { - Debug.Log(" Ŭ ̶ Ʈ ϴ."); + Debug.Log("���� �� Ŭ���� ���̶� ����Ʈ�� �� �� �����ϴ�."); return; } @@ -37,11 +37,11 @@ public void OpenClearGate() if (exitGate != null) { exitGate.OpenGate(); - Debug.Log(" Ŭ Ʈ "); + Debug.Log("�� Ŭ���� ����Ʈ ����"); } else { - Debug.LogWarning("Exit Gate ʾҽϴ."); + Debug.LogWarning("Exit Gate�� ������� �ʾҽ��ϴ�."); } } @@ -50,4 +50,10 @@ public void ResetClearState() isRoomCleared = false; gateOpened = false; } + + public void OpenDoor(string code) + { + Debug.Log($"다음씬코드 : {code}"); + } + } \ No newline at end of file diff --git a/Assets/02_Scripts/Npcs/FollowObject.cs b/Assets/02_Scripts/Npcs/FollowObject.cs index f2f0a158..a9e44efd 100644 --- a/Assets/02_Scripts/Npcs/FollowObject.cs +++ b/Assets/02_Scripts/Npcs/FollowObject.cs @@ -3,9 +3,13 @@ // 대상(보통 플레이어)을 NavMesh 위에서 따라다니는 간단한 동행 스크립트. // 속도/가속/높이(Base Offset) 등은 NavMeshAgent 컴포넌트에서 설정한다. +// 추적은 _followEnabled로 동적으로 켜고/끌 수 있다. [RequireComponent(typeof(NavMeshAgent))] public class FollowObject : MonoBehaviour { + [Header("Enable")] + [SerializeField] private bool _followEnabled = true; // 추적 on/off (런타임에 동적 변경 가능) + [Header("Target")] [SerializeField] private Transform _target; // 비워두면 Camera.main 사용 @@ -20,14 +24,23 @@ public class FollowObject : MonoBehaviour private NavMeshAgent _agent; private float _repathTimer; + public bool FollowEnabled + { + get => _followEnabled; + set => SetFollowEnabled(value); + } + private void Awake() { _agent = GetComponent(); _agent.stoppingDistance = _followDistance; + ApplyAgentStopped(); } private void Update() { + if (!_followEnabled) return; + var target = ResolveTarget(); if (target == null || !_agent.isOnNavMesh) return; @@ -45,6 +58,28 @@ private void Update() FaceTarget(target); } + // ── 동적 on/off ────────────────────────────────────────────── + public void SetFollowEnabled(bool on) + { + _followEnabled = on; + if (on) _repathTimer = 0f; // 켜면 즉시 경로 재계산 + ApplyAgentStopped(); + } + + public void EnableFollow() => SetFollowEnabled(true); // UnityEvent 연결용(무인자) + public void DisableFollow() => SetFollowEnabled(false); + + // 끄면 즉시 멈추고 남은 경로 제거(잔여 이동 방지), 켜면 이동 재개 + private void ApplyAgentStopped() + { + if (_agent == null || !_agent.isActiveAndEnabled || !_agent.isOnNavMesh) return; + + _agent.isStopped = !_followEnabled; + if (!_followEnabled) + _agent.ResetPath(); + } + // ───────────────────────────────────────────────────────────── + private void FaceTarget(Transform target) { Vector3 dir = target.position - transform.position; diff --git a/Assets/02_Scripts/UI/ChoiceHud.cs b/Assets/02_Scripts/UI/ChoiceHud.cs index abbcb8be..9351d05d 100644 --- a/Assets/02_Scripts/UI/ChoiceHud.cs +++ b/Assets/02_Scripts/UI/ChoiceHud.cs @@ -47,7 +47,7 @@ public async Awaitable Show(string choiceQuestion, List choic for (int i = 0; i < choices.Count; i++) { var row = Instantiate(_rowPrefab, _rowContainer); - row.Bind(i, choices[i].ChoiceText); + row.Bind(i, DialogVariables.Format(choices[i].ChoiceText)); // {key} 토큰 치환 row.OnClicked += HandleClicked; _rows.Add(row); } @@ -85,8 +85,9 @@ private void Hide() private void SetQuestion(string question) { if (ChoiceQuestion == null) return; - bool hasQuestion = !string.IsNullOrWhiteSpace(question); - ChoiceQuestion.text = hasQuestion ? question : string.Empty; + string text = DialogVariables.Format(question); // {key} 토큰 치환 + bool hasQuestion = !string.IsNullOrWhiteSpace(text); + ChoiceQuestion.text = hasQuestion ? text : string.Empty; ChoiceQuestion.gameObject.SetActive(hasQuestion); } diff --git a/Assets/02_Scripts/UI/DialogHud.cs b/Assets/02_Scripts/UI/DialogHud.cs index 98ac38fd..30c35496 100644 --- a/Assets/02_Scripts/UI/DialogHud.cs +++ b/Assets/02_Scripts/UI/DialogHud.cs @@ -53,9 +53,9 @@ public void Show(CharacterData speaker, string text, float chestHeight, float fo _activeLateralOffset = lateralOffset; if (_speakerName != null) - _speakerName.text = speaker != null ? speaker.Name : string.Empty; + _speakerName.text = speaker != null ? DialogVariables.Format(speaker.Name) : string.Empty; if (_dialogueText != null) - _dialogueText.text = text; + _dialogueText.text = DialogVariables.Format(text); // {key} 토큰 치환 if (_panel != null) _panel.SetActive(true); } diff --git a/Assets/07_Data/Communication/DialogGraph/CatsRoom/Fairy_CatsRoom_Area1.wdg b/Assets/07_Data/Communication/DialogGraph/CatsRoom/Fairy_CatsRoom_Area1.wdg index 929fd4e7..f569dcfe 100644 --- a/Assets/07_Data/Communication/DialogGraph/CatsRoom/Fairy_CatsRoom_Area1.wdg +++ b/Assets/07_Data/Communication/DialogGraph/CatsRoom/Fairy_CatsRoom_Area1.wdg @@ -172,6 +172,8 @@ MonoBehaviour: - Voice - LineDuration - LookAtPlayer + - WaitForInput + - __option_EventKey m_ValueList: - rid: 6595524353106116637 - rid: 6595524353106116638 @@ -181,6 +183,8 @@ MonoBehaviour: - rid: 6595524353106116642 - rid: 6595524353106116643 - rid: 6595524353106116644 + - rid: 6595524374970761386 + - rid: 6595524374970761398 m_InputPortInfos: expandedPortsById: m_KeyList: [] @@ -292,6 +296,8 @@ MonoBehaviour: - Voice - LineDuration - LookAtPlayer + - WaitForInput + - __option_EventKey m_ValueList: - rid: 6595524353106116648 - rid: 6595524353106116649 @@ -301,6 +307,8 @@ MonoBehaviour: - rid: 6595524353106116653 - rid: 6595524353106116654 - rid: 6595524353106116655 + - rid: 6595524374970761387 + - rid: 6595524374970761399 m_InputPortInfos: expandedPortsById: m_KeyList: [] @@ -386,3 +394,19 @@ MonoBehaviour: - rid: 6595524353106116656 type: {class: DialogLineNode, ns: WhaleAdventure.Dialog.GraphTool.Editor, asm: Assembly-CSharp-Editor} data: + - rid: 6595524374970761386 + type: {class: 'Constant`1[[System.Boolean, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: 0 + - rid: 6595524374970761387 + type: {class: 'Constant`1[[System.Boolean, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: 0 + - rid: 6595524374970761398 + type: {class: 'Constant`1[[System.String, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: + - rid: 6595524374970761399 + type: {class: 'Constant`1[[System.String, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: diff --git a/Assets/07_Data/Communication/DialogGraph/CatsRoom/Fairy_CatsRoom_Area2.wdg b/Assets/07_Data/Communication/DialogGraph/CatsRoom/Fairy_CatsRoom_Area2.wdg index b65240fc..90d08a5c 100644 --- a/Assets/07_Data/Communication/DialogGraph/CatsRoom/Fairy_CatsRoom_Area2.wdg +++ b/Assets/07_Data/Communication/DialogGraph/CatsRoom/Fairy_CatsRoom_Area2.wdg @@ -172,6 +172,8 @@ MonoBehaviour: - Voice - LineDuration - LookAtPlayer + - WaitForInput + - __option_EventKey m_ValueList: - rid: 6595524353106116637 - rid: 6595524353106116638 @@ -181,6 +183,8 @@ MonoBehaviour: - rid: 6595524353106116642 - rid: 6595524353106116643 - rid: 6595524353106116644 + - rid: 6595524374970761384 + - rid: 6595524374970761396 m_InputPortInfos: expandedPortsById: m_KeyList: [] @@ -291,6 +295,8 @@ MonoBehaviour: - Voice - LineDuration - LookAtPlayer + - WaitForInput + - __option_EventKey m_ValueList: - rid: 6595524353106116648 - rid: 6595524353106116649 @@ -300,6 +306,8 @@ MonoBehaviour: - rid: 6595524353106116653 - rid: 6595524353106116654 - rid: 6595524353106116655 + - rid: 6595524374970761385 + - rid: 6595524374970761397 m_InputPortInfos: expandedPortsById: m_KeyList: [] @@ -385,3 +393,19 @@ MonoBehaviour: - rid: 6595524353106116656 type: {class: DialogLineNode, ns: WhaleAdventure.Dialog.GraphTool.Editor, asm: Assembly-CSharp-Editor} data: + - rid: 6595524374970761384 + type: {class: 'Constant`1[[System.Boolean, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: 0 + - rid: 6595524374970761385 + type: {class: 'Constant`1[[System.Boolean, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: 0 + - rid: 6595524374970761396 + type: {class: 'Constant`1[[System.String, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: + - rid: 6595524374970761397 + type: {class: 'Constant`1[[System.String, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: diff --git a/Assets/07_Data/Communication/DialogGraph/CatsRoom/Fairy_CatsRoom_ClearArea.wdg b/Assets/07_Data/Communication/DialogGraph/CatsRoom/Fairy_CatsRoom_ClearArea.wdg new file mode 100644 index 00000000..984438c8 --- /dev/null +++ b/Assets/07_Data/Communication/DialogGraph/CatsRoom/Fairy_CatsRoom_ClearArea.wdg @@ -0,0 +1,738 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &1 +MonoBehaviour: + m_ObjectHideFlags: 61 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 790b4d75d92f4b0984310a268dbd952f, type: 3} + m_Name: Fairy_CatsRoom_ClearArea + m_EditorClassIdentifier: Unity.GraphToolkit.Editor::Unity.GraphToolkit.Editor.Implementation.GraphObjectImp + m_GraphModel: + rid: 6595524353106116630 + references: + version: 2 + RefIds: + - rid: -2 + type: {class: , ns: , asm: } + - rid: 6595524353106116630 + type: {class: GraphModelImp, ns: Unity.GraphToolkit.Editor.Implementation, asm: Unity.GraphToolkit.Editor} + data: + m_Guid: + m_Value0: 13819889836145151562 + m_Value1: 2645381255326452780 + m_HashGuid: + serializedVersion: 2 + Hash: 4a8e76c6951ccabf2ccc35633c48b624 + m_Name: Fairy_CatsRoom_ClearArea + m_GraphNodeModels: + - rid: 6595524353106116633 + - rid: 6595524353106116635 + - rid: 6595524353106116646 + - rid: 6595524374970761358 + - rid: 6595524374970761369 + m_GraphWireModels: + - rid: 6595524353106116636 + - rid: 6595524353106116647 + - rid: 6595524374970761359 + - rid: 6595524374970761370 + m_GraphStickyNoteModels: [] + m_GraphPlacematModels: [] + m_GraphVariableModels: [] + m_GraphPortalModels: [] + m_SectionModels: + - rid: 6595524353106116631 + m_LocalSubgraphs: [] + m_LastKnownBounds: + serializedVersion: 2 + x: 222 + y: -41 + width: 1433 + height: 882 + m_GraphElementMetaData: + - m_Guid: + m_Value0: 14845512388065122572 + m_Value1: 17804268460506216482 + m_HashGuid: + serializedVersion: 2 + Hash: 0c5948afdcda05ce22f82972d57715f7 + m_Category: 0 + m_Index: 0 + - m_Guid: + m_Value0: 7989713923298697385 + m_Value1: 15604869423937906234 + m_HashGuid: + serializedVersion: 2 + Hash: a920365f7b2ae16e3a662c1c10a28fd8 + m_Category: 0 + m_Index: 1 + - m_Guid: + m_Value0: 5269650743910428719 + m_Value1: 257959026697812224 + m_HashGuid: + serializedVersion: 2 + Hash: 2f7027896e8f214900b9ed385e749403 + m_Category: 2 + m_Index: 0 + - m_Guid: + m_Value0: 7697830479301862552 + m_Value1: 13043115897654624489 + m_HashGuid: + serializedVersion: 2 + Hash: 9864f63b0930d46ae940f4b3cd7402b5 + m_Category: 0 + m_Index: 2 + - m_Guid: + m_Value0: 13678802302849805841 + m_Value1: 5869810211712229956 + m_HashGuid: + serializedVersion: 2 + Hash: 116e289638ded4bd446211b849c17551 + m_Category: 2 + m_Index: 1 + - m_Guid: + m_Value0: 6309969824669224220 + m_Value1: 11825358839457157206 + m_HashGuid: + serializedVersion: 2 + Hash: 1ccdd7b61f84915756905e07361d1ca4 + m_Category: 0 + m_Index: 3 + - m_Guid: + m_Value0: 3397748348636220684 + m_Value1: 10317322138978035326 + m_HashGuid: + serializedVersion: 2 + Hash: 0ccda1fc1e3a272f7e260f67d27d2e8f + m_Category: 2 + m_Index: 2 + - m_Guid: + m_Value0: 14492247198202050630 + m_Value1: 8595945445982712313 + m_HashGuid: + serializedVersion: 2 + Hash: 46b8fb250bce1ec9f9b16f00d7ee4a77 + m_Category: 0 + m_Index: 4 + - m_Guid: + m_Value0: 4733159566535984953 + m_Value1: 16169765346515963957 + m_HashGuid: + serializedVersion: 2 + Hash: 39879e648c8faf413550815ce98b66e0 + m_Category: 2 + m_Index: 3 + m_EntryPoint: + rid: 6595524353106116633 + m_Graph: + rid: 6595524353106116632 + - rid: 6595524353106116631 + type: {class: SectionModel, ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Guid: + m_Value0: 13482299192089173763 + m_Value1: 8100932157345530803 + m_HashGuid: + serializedVersion: 2 + Hash: 03df02d4aebf1abbb3831e64e04a6c70 + m_Version: 2 + m_Items: [] + m_Title: + - rid: 6595524353106116632 + type: {class: DialogGraph, ns: WhaleAdventure.Dialog.GraphTool.Editor, asm: Assembly-CSharp-Editor} + data: + - rid: 6595524353106116633 + type: {class: UserNodeModelImp, ns: Unity.GraphToolkit.Editor.Implementation, asm: Unity.GraphToolkit.Editor} + data: + m_Guid: + m_Value0: 14845512388065122572 + m_Value1: 17804268460506216482 + m_HashGuid: + serializedVersion: 2 + Hash: 0c5948afdcda05ce22f82972d57715f7 + m_Version: 2 + m_Position: {x: 222.2174, y: 116.434784} + m_Title: + m_Tooltip: + m_NodePreviewModel: + rid: -2 + m_State: 0 + m_InputConstantsById: + m_KeyList: [] + m_ValueList: [] + m_InputPortInfos: + expandedPortsById: + m_KeyList: [] + m_ValueList: + m_OutputPortInfos: + expandedPortsById: + m_KeyList: [] + m_ValueList: + m_Collapsed: 0 + m_CurrentModeIndex: 0 + m_ElementColor: + m_Color: {r: 0, g: 0, b: 0, a: 0} + m_HasUserColor: 0 + m_Node: + rid: 6595524353106116634 + - rid: 6595524353106116634 + type: {class: DialogStartNode, ns: WhaleAdventure.Dialog.GraphTool.Editor, asm: Assembly-CSharp-Editor} + data: + - rid: 6595524353106116635 + type: {class: UserNodeModelImp, ns: Unity.GraphToolkit.Editor.Implementation, asm: Unity.GraphToolkit.Editor} + data: + m_Guid: + m_Value0: 7989713923298697385 + m_Value1: 15604869423937906234 + m_HashGuid: + serializedVersion: 2 + Hash: a920365f7b2ae16e3a662c1c10a28fd8 + m_Version: 2 + m_Position: {x: 430.9063, y: 86.04323} + m_Title: + m_Tooltip: + m_NodePreviewModel: + rid: -2 + m_State: 0 + m_InputConstantsById: + m_KeyList: + - __option_ChoiceCount + - Speaker + - TalkText + - Gesture + - Expression + - Voice + - LineDuration + - LookAtPlayer + - WaitForInput + - __option_EventKey + m_ValueList: + - rid: 6595524353106116637 + - rid: 6595524353106116638 + - rid: 6595524353106116639 + - rid: 6595524353106116640 + - rid: 6595524353106116641 + - rid: 6595524353106116642 + - rid: 6595524353106116643 + - rid: 6595524353106116644 + - rid: 6595524374970761380 + - rid: 6595524374970761406 + m_InputPortInfos: + expandedPortsById: + m_KeyList: [] + m_ValueList: + m_OutputPortInfos: + expandedPortsById: + m_KeyList: [] + m_ValueList: + m_Collapsed: 0 + m_CurrentModeIndex: 0 + m_ElementColor: + m_Color: {r: 0, g: 0, b: 0, a: 0} + m_HasUserColor: 0 + m_Node: + rid: 6595524353106116645 + - rid: 6595524353106116636 + type: {class: WireModel, ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Guid: + m_Value0: 5269650743910428719 + m_Value1: 257959026697812224 + m_HashGuid: + serializedVersion: 2 + Hash: 2f7027896e8f214900b9ed385e749403 + m_Version: 2 + m_FromPortReference: + m_NodeModelGuid: + m_Value0: 14845512388065122572 + m_Value1: 17804268460506216482 + m_NodeModelHashGuid: + serializedVersion: 2 + Hash: 0c5948afdcda05ce22f82972d57715f7 + m_UniqueId: Out + m_PortDirection: 2 + m_PortOrientation: 0 + m_Title: + m_ToPortReference: + m_NodeModelGuid: + m_Value0: 7989713923298697385 + m_Value1: 15604869423937906234 + m_NodeModelHashGuid: + serializedVersion: 2 + Hash: a920365f7b2ae16e3a662c1c10a28fd8 + m_UniqueId: In + m_PortDirection: 1 + m_PortOrientation: 0 + m_Title: + - rid: 6595524353106116637 + type: {class: 'Constant`1[[System.Int32, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: 0 + - rid: 6595524353106116638 + type: {class: 'Constant`1[[CharacterData, Assembly-CSharp]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: {fileID: 11400000, guid: 816884903bb3c4d478520286d768c304, type: 2} + - rid: 6595524353106116639 + type: {class: 'Constant`1[[WhaleAdventure.Dialog.GraphTool.Editor.DialogText, Assembly-CSharp-Editor]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: + Value: "\uB2E4\uC74C \uACF5\uAC04\uC73C\uB85C \uAC00\uB294 \uBB38\uC774 + \uC5F4\uB838\uC5B4." + - rid: 6595524353106116640 + type: {class: 'Constant`1[[GestureData, Assembly-CSharp]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: {fileID: 0} + - rid: 6595524353106116641 + type: {class: 'Constant`1[[ExpressionData, Assembly-CSharp]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: {fileID: 0} + - rid: 6595524353106116642 + type: {class: 'Constant`1[[VoiceClip, Assembly-CSharp]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: {fileID: 0} + - rid: 6595524353106116643 + type: {class: 'Constant`1[[System.Single, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: 5 + - rid: 6595524353106116644 + type: {class: 'Constant`1[[System.Boolean, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: 1 + - rid: 6595524353106116645 + type: {class: DialogLineNode, ns: WhaleAdventure.Dialog.GraphTool.Editor, asm: Assembly-CSharp-Editor} + data: + - rid: 6595524353106116646 + type: {class: UserNodeModelImp, ns: Unity.GraphToolkit.Editor.Implementation, asm: Unity.GraphToolkit.Editor} + data: + m_Guid: + m_Value0: 7697830479301862552 + m_Value1: 13043115897654624489 + m_HashGuid: + serializedVersion: 2 + Hash: 9864f63b0930d46ae940f4b3cd7402b5 + m_Version: 2 + m_Position: {x: 806, y: 84} + m_Title: + m_Tooltip: + m_NodePreviewModel: + rid: -2 + m_State: 0 + m_InputConstantsById: + m_KeyList: + - __option_ChoiceCount + - Speaker + - TalkText + - Gesture + - Expression + - Voice + - LineDuration + - LookAtPlayer + - ChoiceQuestion + - Choice0Text + - Choice1Text + - WaitForInput + - __option_EventKey + - Choice0Code + - Choice1Code + m_ValueList: + - rid: 6595524353106116648 + - rid: 6595524353106116649 + - rid: 6595524353106116650 + - rid: 6595524353106116651 + - rid: 6595524353106116652 + - rid: 6595524353106116653 + - rid: 6595524353106116654 + - rid: 6595524353106116655 + - rid: 6595524374970761341 + - rid: 6595524374970761342 + - rid: 6595524374970761343 + - rid: 6595524374970761381 + - rid: 6595524374970761407 + - rid: 6595524374970761412 + - rid: 6595524374970761413 + m_InputPortInfos: + expandedPortsById: + m_KeyList: [] + m_ValueList: + m_OutputPortInfos: + expandedPortsById: + m_KeyList: [] + m_ValueList: + m_Collapsed: 0 + m_CurrentModeIndex: 0 + m_ElementColor: + m_Color: {r: 0, g: 0, b: 0, a: 0} + m_HasUserColor: 0 + m_Node: + rid: 6595524353106116656 + - rid: 6595524353106116647 + type: {class: WireModel, ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Guid: + m_Value0: 13678802302849805841 + m_Value1: 5869810211712229956 + m_HashGuid: + serializedVersion: 2 + Hash: 116e289638ded4bd446211b849c17551 + m_Version: 2 + m_FromPortReference: + m_NodeModelGuid: + m_Value0: 7989713923298697385 + m_Value1: 15604869423937906234 + m_NodeModelHashGuid: + serializedVersion: 2 + Hash: a920365f7b2ae16e3a662c1c10a28fd8 + m_UniqueId: Out + m_PortDirection: 2 + m_PortOrientation: 0 + m_Title: + m_ToPortReference: + m_NodeModelGuid: + m_Value0: 7697830479301862552 + m_Value1: 13043115897654624489 + m_NodeModelHashGuid: + serializedVersion: 2 + Hash: 9864f63b0930d46ae940f4b3cd7402b5 + m_UniqueId: In + m_PortDirection: 1 + m_PortOrientation: 0 + m_Title: + - rid: 6595524353106116648 + type: {class: 'Constant`1[[System.Int32, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: 2 + - rid: 6595524353106116649 + type: {class: 'Constant`1[[CharacterData, Assembly-CSharp]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: {fileID: 11400000, guid: 816884903bb3c4d478520286d768c304, type: 2} + - rid: 6595524353106116650 + type: {class: 'Constant`1[[WhaleAdventure.Dialog.GraphTool.Editor.DialogText, Assembly-CSharp-Editor]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: + Value: "\uC5B4\uB290 \uACF5\uAC04\uC73C\uB85C \uC774\uB3D9\uD560\uB798?" + - rid: 6595524353106116651 + type: {class: 'Constant`1[[GestureData, Assembly-CSharp]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: {fileID: 0} + - rid: 6595524353106116652 + type: {class: 'Constant`1[[ExpressionData, Assembly-CSharp]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: {fileID: 0} + - rid: 6595524353106116653 + type: {class: 'Constant`1[[VoiceClip, Assembly-CSharp]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: {fileID: 0} + - rid: 6595524353106116654 + type: {class: 'Constant`1[[System.Single, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: 5 + - rid: 6595524353106116655 + type: {class: 'Constant`1[[System.Boolean, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: 0 + - rid: 6595524353106116656 + type: {class: DialogLineNode, ns: WhaleAdventure.Dialog.GraphTool.Editor, asm: Assembly-CSharp-Editor} + data: + - rid: 6595524374970761341 + type: {class: 'Constant`1[[WhaleAdventure.Dialog.GraphTool.Editor.DialogText, Assembly-CSharp-Editor]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: + Value: + - rid: 6595524374970761342 + type: {class: 'Constant`1[[WhaleAdventure.Dialog.GraphTool.Editor.DialogText, Assembly-CSharp-Editor]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: + Value: '{SpaceSceneName1}' + - rid: 6595524374970761343 + type: {class: 'Constant`1[[WhaleAdventure.Dialog.GraphTool.Editor.DialogText, Assembly-CSharp-Editor]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: + Value: '{SpaceSceneName2}' + - rid: 6595524374970761358 + type: {class: UserNodeModelImp, ns: Unity.GraphToolkit.Editor.Implementation, asm: Unity.GraphToolkit.Editor} + data: + m_Guid: + m_Value0: 6309969824669224220 + m_Value1: 11825358839457157206 + m_HashGuid: + serializedVersion: 2 + Hash: 1ccdd7b61f84915756905e07361d1ca4 + m_Version: 2 + m_Position: {x: 1315.6232, y: -40.787323} + m_Title: + m_Tooltip: + m_NodePreviewModel: + rid: -2 + m_State: 0 + m_InputConstantsById: + m_KeyList: + - __option_ChoiceCount + - Speaker + - TalkText + - Gesture + - Expression + - Voice + - LineDuration + - LookAtPlayer + - WaitForInput + - __option_EventKey + m_ValueList: + - rid: 6595524374970761360 + - rid: 6595524374970761361 + - rid: 6595524374970761362 + - rid: 6595524374970761363 + - rid: 6595524374970761364 + - rid: 6595524374970761365 + - rid: 6595524374970761366 + - rid: 6595524374970761367 + - rid: 6595524374970761382 + - rid: 6595524374970761408 + m_InputPortInfos: + expandedPortsById: + m_KeyList: [] + m_ValueList: + m_OutputPortInfos: + expandedPortsById: + m_KeyList: [] + m_ValueList: + m_Collapsed: 0 + m_CurrentModeIndex: 0 + m_ElementColor: + m_Color: {r: 0, g: 0, b: 0, a: 0} + m_HasUserColor: 0 + m_Node: + rid: 6595524374970761368 + - rid: 6595524374970761359 + type: {class: WireModel, ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Guid: + m_Value0: 3397748348636220684 + m_Value1: 10317322138978035326 + m_HashGuid: + serializedVersion: 2 + Hash: 0ccda1fc1e3a272f7e260f67d27d2e8f + m_Version: 2 + m_FromPortReference: + m_NodeModelGuid: + m_Value0: 7697830479301862552 + m_Value1: 13043115897654624489 + m_NodeModelHashGuid: + serializedVersion: 2 + Hash: 9864f63b0930d46ae940f4b3cd7402b5 + m_UniqueId: Choice0Out + m_PortDirection: 2 + m_PortOrientation: 0 + m_Title: "Choice 1 \u2192" + m_ToPortReference: + m_NodeModelGuid: + m_Value0: 6309969824669224220 + m_Value1: 11825358839457157206 + m_NodeModelHashGuid: + serializedVersion: 2 + Hash: 1ccdd7b61f84915756905e07361d1ca4 + m_UniqueId: In + m_PortDirection: 1 + m_PortOrientation: 0 + m_Title: + - rid: 6595524374970761360 + type: {class: 'Constant`1[[System.Int32, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: 0 + - rid: 6595524374970761361 + type: {class: 'Constant`1[[CharacterData, Assembly-CSharp]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: {fileID: 11400000, guid: 816884903bb3c4d478520286d768c304, type: 2} + - rid: 6595524374970761362 + type: {class: 'Constant`1[[WhaleAdventure.Dialog.GraphTool.Editor.DialogText, Assembly-CSharp-Editor]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: + Value: "\uC88B\uC544! {SpaceSceneName1}\uB85C \uC774\uB3D9\uD558\uC790." + - rid: 6595524374970761363 + type: {class: 'Constant`1[[GestureData, Assembly-CSharp]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: {fileID: 0} + - rid: 6595524374970761364 + type: {class: 'Constant`1[[ExpressionData, Assembly-CSharp]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: {fileID: 0} + - rid: 6595524374970761365 + type: {class: 'Constant`1[[VoiceClip, Assembly-CSharp]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: {fileID: 0} + - rid: 6595524374970761366 + type: {class: 'Constant`1[[System.Single, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: 5 + - rid: 6595524374970761367 + type: {class: 'Constant`1[[System.Boolean, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: 0 + - rid: 6595524374970761368 + type: {class: DialogLineNode, ns: WhaleAdventure.Dialog.GraphTool.Editor, asm: Assembly-CSharp-Editor} + data: + - rid: 6595524374970761369 + type: {class: UserNodeModelImp, ns: Unity.GraphToolkit.Editor.Implementation, asm: Unity.GraphToolkit.Editor} + data: + m_Guid: + m_Value0: 14492247198202050630 + m_Value1: 8595945445982712313 + m_HashGuid: + serializedVersion: 2 + Hash: 46b8fb250bce1ec9f9b16f00d7ee4a77 + m_Version: 2 + m_Position: {x: 1314.8867, y: 457.07712} + m_Title: + m_Tooltip: + m_NodePreviewModel: + rid: -2 + m_State: 0 + m_InputConstantsById: + m_KeyList: + - __option_ChoiceCount + - Speaker + - TalkText + - Gesture + - Expression + - Voice + - LineDuration + - LookAtPlayer + - WaitForInput + - __option_EventKey + m_ValueList: + - rid: 6595524374970761371 + - rid: 6595524374970761372 + - rid: 6595524374970761373 + - rid: 6595524374970761374 + - rid: 6595524374970761375 + - rid: 6595524374970761376 + - rid: 6595524374970761377 + - rid: 6595524374970761378 + - rid: 6595524374970761383 + - rid: 6595524374970761409 + m_InputPortInfos: + expandedPortsById: + m_KeyList: [] + m_ValueList: + m_OutputPortInfos: + expandedPortsById: + m_KeyList: [] + m_ValueList: + m_Collapsed: 0 + m_CurrentModeIndex: 0 + m_ElementColor: + m_Color: {r: 0, g: 0, b: 0, a: 0} + m_HasUserColor: 0 + m_Node: + rid: 6595524374970761379 + - rid: 6595524374970761370 + type: {class: WireModel, ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Guid: + m_Value0: 4733159566535984953 + m_Value1: 16169765346515963957 + m_HashGuid: + serializedVersion: 2 + Hash: 39879e648c8faf413550815ce98b66e0 + m_Version: 2 + m_FromPortReference: + m_NodeModelGuid: + m_Value0: 7697830479301862552 + m_Value1: 13043115897654624489 + m_NodeModelHashGuid: + serializedVersion: 2 + Hash: 9864f63b0930d46ae940f4b3cd7402b5 + m_UniqueId: Choice1Out + m_PortDirection: 2 + m_PortOrientation: 0 + m_Title: "Choice 2 \u2192" + m_ToPortReference: + m_NodeModelGuid: + m_Value0: 14492247198202050630 + m_Value1: 8595945445982712313 + m_NodeModelHashGuid: + serializedVersion: 2 + Hash: 46b8fb250bce1ec9f9b16f00d7ee4a77 + m_UniqueId: In + m_PortDirection: 1 + m_PortOrientation: 0 + m_Title: + - rid: 6595524374970761371 + type: {class: 'Constant`1[[System.Int32, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: 0 + - rid: 6595524374970761372 + type: {class: 'Constant`1[[CharacterData, Assembly-CSharp]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: {fileID: 11400000, guid: 816884903bb3c4d478520286d768c304, type: 2} + - rid: 6595524374970761373 + type: {class: 'Constant`1[[WhaleAdventure.Dialog.GraphTool.Editor.DialogText, Assembly-CSharp-Editor]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: + Value: "\uC88B\uC544! {SpaceSceneName2}\uB85C \uC774\uB3D9\uD558\uC790." + - rid: 6595524374970761374 + type: {class: 'Constant`1[[GestureData, Assembly-CSharp]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: {fileID: 0} + - rid: 6595524374970761375 + type: {class: 'Constant`1[[ExpressionData, Assembly-CSharp]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: {fileID: 0} + - rid: 6595524374970761376 + type: {class: 'Constant`1[[VoiceClip, Assembly-CSharp]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: {fileID: 0} + - rid: 6595524374970761377 + type: {class: 'Constant`1[[System.Single, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: 5 + - rid: 6595524374970761378 + type: {class: 'Constant`1[[System.Boolean, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: 0 + - rid: 6595524374970761379 + type: {class: DialogLineNode, ns: WhaleAdventure.Dialog.GraphTool.Editor, asm: Assembly-CSharp-Editor} + data: + - rid: 6595524374970761380 + type: {class: 'Constant`1[[System.Boolean, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: 0 + - rid: 6595524374970761381 + type: {class: 'Constant`1[[System.Boolean, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: 0 + - rid: 6595524374970761382 + type: {class: 'Constant`1[[System.Boolean, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: 1 + - rid: 6595524374970761383 + type: {class: 'Constant`1[[System.Boolean, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: 1 + - rid: 6595524374970761406 + type: {class: 'Constant`1[[System.String, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: + - rid: 6595524374970761407 + type: {class: 'Constant`1[[System.String, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: + - rid: 6595524374970761408 + type: {class: 'Constant`1[[System.String, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: OpenDoor + - rid: 6595524374970761409 + type: {class: 'Constant`1[[System.String, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: OpenDoor + - rid: 6595524374970761412 + type: {class: 'Constant`1[[System.String, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: '{SpaceSceneCode1}' + - rid: 6595524374970761413 + type: {class: 'Constant`1[[System.String, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: '{SpaceSceneCode2}' diff --git a/Assets/07_Data/Communication/DialogGraph/CatsRoom/Fairy_CatsRoom_ClearArea.wdg.meta b/Assets/07_Data/Communication/DialogGraph/CatsRoom/Fairy_CatsRoom_ClearArea.wdg.meta new file mode 100644 index 00000000..6d736561 --- /dev/null +++ b/Assets/07_Data/Communication/DialogGraph/CatsRoom/Fairy_CatsRoom_ClearArea.wdg.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 3c3875d84aa3e6c43a3db0518d5cafae +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 2ae5ca89bbed445479d9023586f0c041, type: 3} diff --git a/Assets/07_Data/Communication/DialogGraph/DialogGraph_Test.wdg b/Assets/07_Data/Communication/DialogGraph/DialogGraph_Test.wdg index 03c53889..102a41c6 100644 --- a/Assets/07_Data/Communication/DialogGraph/DialogGraph_Test.wdg +++ b/Assets/07_Data/Communication/DialogGraph/DialogGraph_Test.wdg @@ -244,6 +244,8 @@ MonoBehaviour: - Voice - LineDuration - LookAtPlayer + - WaitForInput + - __option_EventKey m_ValueList: - rid: 6595524284503556362 - rid: 6595524284503556363 @@ -253,6 +255,8 @@ MonoBehaviour: - rid: 6595524284503556367 - rid: 6595524284503556368 - rid: 6595524284503556369 + - rid: 6595524374970761388 + - rid: 6595524374970761400 m_InputPortInfos: expandedPortsById: m_KeyList: [] @@ -365,6 +369,10 @@ MonoBehaviour: - ChoiceQuestion - Choice0Text - Choice1Text + - WaitForInput + - __option_EventKey + - Choice0Code + - Choice1Code m_ValueList: - rid: 6595524284503556374 - rid: 6595524284503556375 @@ -377,6 +385,10 @@ MonoBehaviour: - rid: 6595524284503556397 - rid: 6595524284503556398 - rid: 6595524284503556399 + - rid: 6595524374970761389 + - rid: 6595524374970761401 + - rid: 6595524374970761414 + - rid: 6595524374970761415 m_InputPortInfos: expandedPortsById: m_KeyList: [] @@ -470,6 +482,8 @@ MonoBehaviour: - Voice - LineDuration - LookAtPlayer + - WaitForInput + - __option_EventKey m_ValueList: - rid: 6595524284503556402 - rid: 6595524284503556403 @@ -479,6 +493,8 @@ MonoBehaviour: - rid: 6595524284503556407 - rid: 6595524284503556408 - rid: 6595524284503556409 + - rid: 6595524374970761390 + - rid: 6595524374970761402 m_InputPortInfos: expandedPortsById: m_KeyList: [] @@ -588,6 +604,8 @@ MonoBehaviour: - Voice - LineDuration - LookAtPlayer + - WaitForInput + - __option_EventKey m_ValueList: - rid: 6595524284503556413 - rid: 6595524284503556414 @@ -597,6 +615,8 @@ MonoBehaviour: - rid: 6595524284503556418 - rid: 6595524284503556419 - rid: 6595524284503556420 + - rid: 6595524374970761391 + - rid: 6595524374970761403 m_InputPortInfos: expandedPortsById: m_KeyList: [] @@ -706,6 +726,8 @@ MonoBehaviour: - Voice - LineDuration - LookAtPlayer + - WaitForInput + - __option_EventKey m_ValueList: - rid: 6595524284503556424 - rid: 6595524284503556425 @@ -715,6 +737,8 @@ MonoBehaviour: - rid: 6595524284503556429 - rid: 6595524284503556430 - rid: 6595524284503556431 + - rid: 6595524374970761392 + - rid: 6595524374970761404 m_InputPortInfos: expandedPortsById: m_KeyList: [] @@ -825,6 +849,8 @@ MonoBehaviour: - Voice - LineDuration - LookAtPlayer + - WaitForInput + - __option_EventKey m_ValueList: - rid: 6595524284503556435 - rid: 6595524284503556436 @@ -834,6 +860,8 @@ MonoBehaviour: - rid: 6595524284503556440 - rid: 6595524284503556441 - rid: 6595524284503556442 + - rid: 6595524374970761393 + - rid: 6595524374970761405 m_InputPortInfos: expandedPortsById: m_KeyList: [] @@ -949,3 +977,59 @@ MonoBehaviour: m_PortDirection: 1 m_PortOrientation: 0 m_Title: + - rid: 6595524374970761388 + type: {class: 'Constant`1[[System.Boolean, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: 0 + - rid: 6595524374970761389 + type: {class: 'Constant`1[[System.Boolean, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: 0 + - rid: 6595524374970761390 + type: {class: 'Constant`1[[System.Boolean, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: 0 + - rid: 6595524374970761391 + type: {class: 'Constant`1[[System.Boolean, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: 0 + - rid: 6595524374970761392 + type: {class: 'Constant`1[[System.Boolean, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: 0 + - rid: 6595524374970761393 + type: {class: 'Constant`1[[System.Boolean, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: 0 + - rid: 6595524374970761400 + type: {class: 'Constant`1[[System.String, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: + - rid: 6595524374970761401 + type: {class: 'Constant`1[[System.String, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: + - rid: 6595524374970761402 + type: {class: 'Constant`1[[System.String, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: + - rid: 6595524374970761403 + type: {class: 'Constant`1[[System.String, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: + - rid: 6595524374970761404 + type: {class: 'Constant`1[[System.String, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: + - rid: 6595524374970761405 + type: {class: 'Constant`1[[System.String, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: + - rid: 6595524374970761414 + type: {class: 'Constant`1[[System.String, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: + - rid: 6595524374970761415 + type: {class: 'Constant`1[[System.String, mscorlib]]', ns: Unity.GraphToolkit.Editor, asm: Unity.GraphToolkit.Internal.Editor} + data: + m_Value: diff --git a/Assets/99_Settings/Input/GameInput.cs b/Assets/99_Settings/Input/GameInput.cs index 8522142a..92e241a3 100644 --- a/Assets/99_Settings/Input/GameInput.cs +++ b/Assets/99_Settings/Input/GameInput.cs @@ -127,6 +127,15 @@ public @GameInput() ""processors"": """", ""interactions"": """", ""initialStateCheck"": false + }, + { + ""name"": ""DialogNext"", + ""type"": ""Button"", + ""id"": ""c7e3a1f0-4444-4abc-8def-000000000004"", + ""expectedControlType"": """", + ""processors"": """", + ""interactions"": """", + ""initialStateCheck"": false } ], ""bindings"": [ @@ -184,6 +193,28 @@ public @GameInput() ""action"": ""Interact"", ""isComposite"": false, ""isPartOfComposite"": false + }, + { + ""name"": """", + ""id"": ""c7e3a1f0-5555-4abc-8def-000000000005"", + ""path"": ""{RightHand}/{SecondaryButton}"", + ""interactions"": """", + ""processors"": """", + ""groups"": """", + ""action"": ""DialogNext"", + ""isComposite"": false, + ""isPartOfComposite"": false + }, + { + ""name"": """", + ""id"": ""c7e3a1f0-6666-4abc-8def-000000000006"", + ""path"": ""/space"", + ""interactions"": """", + ""processors"": """", + ""groups"": """", + ""action"": ""DialogNext"", + ""isComposite"": false, + ""isPartOfComposite"": false } ] } @@ -196,6 +227,7 @@ public @GameInput() m_Player_Key_Left = m_Player.FindAction("Key_Left", throwIfNotFound: true); m_Player_Key_Right = m_Player.FindAction("Key_Right", throwIfNotFound: true); m_Player_Interact = m_Player.FindAction("Interact", throwIfNotFound: true); + m_Player_DialogNext = m_Player.FindAction("DialogNext", throwIfNotFound: true); } ~@GameInput() @@ -280,6 +312,7 @@ public int FindBinding(InputBinding bindingMask, out InputAction action) private readonly InputAction m_Player_Key_Left; private readonly InputAction m_Player_Key_Right; private readonly InputAction m_Player_Interact; + private readonly InputAction m_Player_DialogNext; /// /// Provides access to input actions defined in input action map "Player". /// @@ -308,6 +341,10 @@ public struct PlayerActions /// public InputAction @Interact => m_Wrapper.m_Player_Interact; /// + /// Provides access to the underlying input action "Player/DialogNext". + /// + public InputAction @DialogNext => m_Wrapper.m_Player_DialogNext; + /// /// Provides access to the underlying input action map instance. /// public InputActionMap Get() { return m_Wrapper.m_Player; } @@ -345,6 +382,9 @@ public void AddCallbacks(IPlayerActions instance) @Interact.started += instance.OnInteract; @Interact.performed += instance.OnInteract; @Interact.canceled += instance.OnInteract; + @DialogNext.started += instance.OnDialogNext; + @DialogNext.performed += instance.OnDialogNext; + @DialogNext.canceled += instance.OnDialogNext; } /// @@ -368,6 +408,9 @@ private void UnregisterCallbacks(IPlayerActions instance) @Interact.started -= instance.OnInteract; @Interact.performed -= instance.OnInteract; @Interact.canceled -= instance.OnInteract; + @DialogNext.started -= instance.OnDialogNext; + @DialogNext.performed -= instance.OnDialogNext; + @DialogNext.canceled -= instance.OnDialogNext; } /// @@ -436,5 +479,12 @@ public interface IPlayerActions /// /// void OnInteract(InputAction.CallbackContext context); + /// + /// Method invoked when associated input action "DialogNext" is either , or . + /// + /// + /// + /// + void OnDialogNext(InputAction.CallbackContext context); } } diff --git a/Assets/99_Settings/Input/GameInput.inputactions b/Assets/99_Settings/Input/GameInput.inputactions index 3ea9adef..e400e8aa 100644 --- a/Assets/99_Settings/Input/GameInput.inputactions +++ b/Assets/99_Settings/Input/GameInput.inputactions @@ -41,6 +41,15 @@ "processors": "", "interactions": "", "initialStateCheck": false + }, + { + "name": "DialogNext", + "type": "Button", + "id": "c7e3a1f0-4444-4abc-8def-000000000004", + "expectedControlType": "", + "processors": "", + "interactions": "", + "initialStateCheck": false } ], "bindings": [ @@ -98,6 +107,28 @@ "action": "Interact", "isComposite": false, "isPartOfComposite": false + }, + { + "name": "", + "id": "c7e3a1f0-5555-4abc-8def-000000000005", + "path": "{RightHand}/{SecondaryButton}", + "interactions": "", + "processors": "", + "groups": "", + "action": "DialogNext", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "c7e3a1f0-6666-4abc-8def-000000000006", + "path": "/space", + "interactions": "", + "processors": "", + "groups": "", + "action": "DialogNext", + "isComposite": false, + "isPartOfComposite": false } ] } diff --git a/Assets/My project/Fonts/Pretendard-Black SDF.asset b/Assets/My project/Fonts/Pretendard-Black SDF.asset index 2fcd95a4..3eed5471 100644 --- a/Assets/My project/Fonts/Pretendard-Black SDF.asset +++ b/Assets/My project/Fonts/Pretendard-Black SDF.asset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3ba0e87e30e2da2803bd86a2630597c0fd3ca9d3d1c466df18454c24d7bbf168 -size 41373404 +oid sha256:a9b875e17617765e0873113f0ad2b5b577d6d248112e9f3dd410e6e8c365fdb6 +size 41411611