using System; using UnityEngine; namespace DDD { [Flags] public enum RestaurantOrderType : uint { Wait = 0, Order = 1u << 0, Serve = 1u << 1, } public class RestaurantOrderInteractionSubsystem : MonoBehaviour, IInteractionSubsystemObject { [SerializeField] protected RestaurantOrderType orderType = RestaurantOrderType.Wait; private RestaurantOrderType currentRestaurantOrderType; private void Start() { currentRestaurantOrderType = orderType; } public bool CanInteract() { // 현재 RestaurantOrderInteractionType를 수행할 수 있는지? if (GetInteractionSubsystemType() == RestaurantOrderType.Wait) { Debug.Assert(false); // TODO // Check WaitCustomer return true; } return false; } public bool OnInteracted(IInteractor interactor, ScriptableObject payloadSo = null) { // _currentRestaurantOrderInteractionType에 따라 동작이 달라지겠지 if (GetInteractionSubsystemType() == RestaurantOrderType.Wait) { // DO WAIT CUSTOMER } return true; } public void InitializeSubsystem() { } public RestaurantOrderType GetInteractionSubsystemType() { return currentRestaurantOrderType; } } }