_interactionType 필드를 RestaurantCharacterInteraction으로 이동

This commit is contained in:
Jeonghyeon Ha 2025-08-19 17:34:17 +09:00
parent 7b1be4bfc2
commit 9632879fe0
3 changed files with 5 additions and 4 deletions

View File

@ -387,7 +387,6 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 2d4266c194d3fd346be961b537c811f1, type: 3} m_Script: {fileID: 11500000, guid: 2d4266c194d3fd346be961b537c811f1, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
_interactionType: 4294967295
--- !u!114 &4956037093100801085 --- !u!114 &4956037093100801085
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -424,6 +423,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 81e01dd8c1cc3404d805400eba1bb4ae, type: 3} m_Script: {fileID: 11500000, guid: 81e01dd8c1cc3404d805400eba1bb4ae, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
_interactionType: 4294967295
_nearColliders: _nearColliders:
- {fileID: 0} - {fileID: 0}
- {fileID: 0} - {fileID: 0}

View File

@ -7,8 +7,6 @@ namespace DDD
[RequireComponent(typeof(SpineController))] [RequireComponent(typeof(SpineController))]
public class RestaurantCharacter : MonoBehaviour, IGameCharacter, IInteractor public class RestaurantCharacter : MonoBehaviour, IGameCharacter, IInteractor
{ {
[EnumToggleButtons, SerializeField] protected InteractionType _interactionType;
RestaurantCharacterInteraction _interactionComponent; RestaurantCharacterInteraction _interactionComponent;
protected SpineController _spineController; protected SpineController _spineController;
@ -25,7 +23,7 @@ protected virtual void Start()
var flag = typeToSolver.Key; var flag = typeToSolver.Key;
if (flag == InteractionType.None) continue; if (flag == InteractionType.None) continue;
if ((_interactionType & flag) == 0) continue; if ((_interactionComponent.InteractionType & flag) == 0) continue;
if (!TryGetComponent(typeToSolver.Value, out _)) if (!TryGetComponent(typeToSolver.Value, out _))
{ {

View File

@ -6,8 +6,11 @@ namespace DDD
{ {
public class RestaurantCharacterInteraction : MonoBehaviour, IInteractor, IEventHandler<RestaurantInteractionEvent> public class RestaurantCharacterInteraction : MonoBehaviour, IInteractor, IEventHandler<RestaurantInteractionEvent>
{ {
[EnumToggleButtons, SerializeField] protected InteractionType _interactionType;
[SerializeField, ReadOnly] protected Collider[] _nearColliders = new Collider[10]; [SerializeField, ReadOnly] protected Collider[] _nearColliders = new Collider[10];
public InteractionType InteractionType => _interactionType;
protected IInteractable _nearestInteractable; protected IInteractable _nearestInteractable;
protected IInteractable _previousInteractable; protected IInteractable _previousInteractable;
protected IInteractable _interactingTarget; protected IInteractable _interactingTarget;