using System; using System.Collections.Generic; using UnityEngine; namespace DDD { [Flags] public enum InteractionType : uint { None = 0u, RestaurantManagementUi = 1u << 0, OpenRestaurant = 1u << 1, All = 0xFFFFFFFFu } public interface IInteractable { bool CanInteract(); bool OnInteracted(IInteractor interactor, ScriptableObject payloadSo = null); InteractionType GetInteractionType(); GameObject GetInteractableGameObject(); void InitializeInteraction(InteractionType interactionType); float GetRequiredHoldTime(); string GetInteractionMessageKey(); } public interface IInteractor { GameObject GetInteractorGameObject(); IInteractable GetFocusedInteractable(); bool CanSolveInteractionType(InteractionType interactionType); bool CanInteractTo(IInteractable interactable, ScriptableObject payloadSo = null); } public interface IInteractionSolver { bool ExecuteInteraction(IInteractor interactor, IInteractable interactable, ScriptableObject payloadSo = null); bool CanExecuteInteraction(IInteractor interactor = null, IInteractable interactable = null, ScriptableObject payloadSo = null); } }