From 9632879fe0cccf5afb0c7cfb196bcb0b83abaa97 Mon Sep 17 00:00:00 2001 From: Jeonghyeon Ha Date: Tue, 19 Aug 2025 17:34:17 +0900 Subject: [PATCH] =?UTF-8?q?=5FinteractionType=20=ED=95=84=EB=93=9C?= =?UTF-8?q?=EB=A5=BC=20RestaurantCharacterInteraction=EC=9C=BC=EB=A1=9C=20?= =?UTF-8?q?=EC=9D=B4=EB=8F=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/_DDD/_Addressables/Prefabs/RestaurantPlayer.prefab | 2 +- .../_Scripts/RestaurantCharacter/Core/RestaurantCharacter.cs | 4 +--- .../Core/RestaurantCharacterInteraction.cs | 3 +++ 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Assets/_DDD/_Addressables/Prefabs/RestaurantPlayer.prefab b/Assets/_DDD/_Addressables/Prefabs/RestaurantPlayer.prefab index 0117c967a..92d5aded1 100644 --- a/Assets/_DDD/_Addressables/Prefabs/RestaurantPlayer.prefab +++ b/Assets/_DDD/_Addressables/Prefabs/RestaurantPlayer.prefab @@ -387,7 +387,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 2d4266c194d3fd346be961b537c811f1, type: 3} m_Name: m_EditorClassIdentifier: - _interactionType: 4294967295 --- !u!114 &4956037093100801085 MonoBehaviour: m_ObjectHideFlags: 0 @@ -424,6 +423,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 81e01dd8c1cc3404d805400eba1bb4ae, type: 3} m_Name: m_EditorClassIdentifier: + _interactionType: 4294967295 _nearColliders: - {fileID: 0} - {fileID: 0} diff --git a/Assets/_DDD/_Scripts/RestaurantCharacter/Core/RestaurantCharacter.cs b/Assets/_DDD/_Scripts/RestaurantCharacter/Core/RestaurantCharacter.cs index c9f4b5d6f..0772089b6 100644 --- a/Assets/_DDD/_Scripts/RestaurantCharacter/Core/RestaurantCharacter.cs +++ b/Assets/_DDD/_Scripts/RestaurantCharacter/Core/RestaurantCharacter.cs @@ -7,8 +7,6 @@ namespace DDD [RequireComponent(typeof(SpineController))] public class RestaurantCharacter : MonoBehaviour, IGameCharacter, IInteractor { - [EnumToggleButtons, SerializeField] protected InteractionType _interactionType; - RestaurantCharacterInteraction _interactionComponent; protected SpineController _spineController; @@ -25,7 +23,7 @@ protected virtual void Start() var flag = typeToSolver.Key; if (flag == InteractionType.None) continue; - if ((_interactionType & flag) == 0) continue; + if ((_interactionComponent.InteractionType & flag) == 0) continue; if (!TryGetComponent(typeToSolver.Value, out _)) { diff --git a/Assets/_DDD/_Scripts/RestaurantCharacter/Core/RestaurantCharacterInteraction.cs b/Assets/_DDD/_Scripts/RestaurantCharacter/Core/RestaurantCharacterInteraction.cs index c03fa8971..2ca1f4021 100644 --- a/Assets/_DDD/_Scripts/RestaurantCharacter/Core/RestaurantCharacterInteraction.cs +++ b/Assets/_DDD/_Scripts/RestaurantCharacter/Core/RestaurantCharacterInteraction.cs @@ -6,8 +6,11 @@ namespace DDD { public class RestaurantCharacterInteraction : MonoBehaviour, IInteractor, IEventHandler { + [EnumToggleButtons, SerializeField] protected InteractionType _interactionType; [SerializeField, ReadOnly] protected Collider[] _nearColliders = new Collider[10]; + public InteractionType InteractionType => _interactionType; + protected IInteractable _nearestInteractable; protected IInteractable _previousInteractable; protected IInteractable _interactingTarget;