using System; using UnityEngine; namespace DDD { [Flags] public enum RestaurantOrderType : uint { Wait = 0u, Reserved = 1u, Order = 1u << 1, Serve = 1u << 2, } public class RestaurantOrderInteractionSubsystem : MonoBehaviour, IInteractionSubsystemObject { [SerializeField] protected RestaurantOrderType orderType = RestaurantOrderType.Wait; private RestaurantOrderType currentRestaurantOrderType; private void Start() { currentRestaurantOrderType = orderType; } public bool CanInteract() { if (GetInteractionSubsystemType() == RestaurantOrderType.Wait) { return true; } return false; } public bool OnInteracted(IInteractor interactor, ScriptableObject payloadSo = null) { if (GetInteractionSubsystemType() == RestaurantOrderType.Wait) { // DO WAIT CUSTOMER } return true; } public ScriptableObject GetPayload() { return null; } public void InitializeSubsystem() { } public RestaurantOrderType GetInteractionSubsystemType() { return currentRestaurantOrderType; } } }