ProjectDDD/Assets/_DDD/_Scripts/GameEvent/IInteractable.cs

36 lines
969 B
C#

using System;
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 interactionPayloadSo = null);
InteractionType GetInteractionType();
GameObject GetInteractableGameObject();
void InitializeInteraction(InteractionType interactionType);
float GetRequiredHoldTime();
string GetInteractionMessageKey();
}
public interface IInteractor
{
GameObject GetInteractorGameObject();
}
public interface IInteractionSolver
{
bool ExecuteInteraction(IInteractor interactor, IInteractable interactable, ScriptableObject interactionPayloadSo = null);
bool CanExecuteInteraction();
}
}