2025-08-08 06:44:11 +00:00
|
|
|
using System;
|
2025-07-17 08:55:45 +00:00
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
namespace DDD
|
|
|
|
{
|
2025-08-08 06:44:11 +00:00
|
|
|
[Flags]
|
|
|
|
public enum InteractionType : uint
|
2025-07-17 08:55:45 +00:00
|
|
|
{
|
2025-08-08 06:44:11 +00:00
|
|
|
None = 0u,
|
|
|
|
RestaurantManagementUi = 1u << 0,
|
|
|
|
OpenRestaurant = 1u << 1,
|
|
|
|
All = 0xFFFFFFFFu
|
2025-07-17 08:55:45 +00:00
|
|
|
}
|
2025-08-08 06:44:11 +00:00
|
|
|
|
2025-07-17 08:55:45 +00:00
|
|
|
public interface IInteractable
|
|
|
|
{
|
|
|
|
bool CanInteract();
|
2025-07-22 11:15:20 +00:00
|
|
|
bool OnInteracted(IInteractor interactor, ScriptableObject interactionPayloadSo = null);
|
|
|
|
InteractionType GetInteractionType();
|
|
|
|
GameObject GetInteractableGameObject();
|
|
|
|
void InitializeInteraction(InteractionType interactionType);
|
2025-08-05 08:09:14 +00:00
|
|
|
float GetRequiredHoldTime();
|
2025-08-05 10:46:36 +00:00
|
|
|
string GetInteractionMessageKey();
|
2025-07-17 08:55:45 +00:00
|
|
|
}
|
|
|
|
public interface IInteractor
|
|
|
|
{
|
2025-07-22 11:15:20 +00:00
|
|
|
GameObject GetInteractorGameObject();
|
|
|
|
}
|
|
|
|
|
|
|
|
public interface IInteractionSolver
|
|
|
|
{
|
2025-08-05 08:09:14 +00:00
|
|
|
bool ExecuteInteraction(IInteractor interactor, IInteractable interactable, ScriptableObject interactionPayloadSo = null);
|
2025-08-07 08:51:36 +00:00
|
|
|
bool CanExecuteInteraction();
|
2025-07-17 08:55:45 +00:00
|
|
|
}
|
|
|
|
}
|