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;