ProjectDDD/Assets/_DDD/_Scripts/RestaurantEnvironment/Interactions/RestaurantOrderInteractionSubsystem.cs

54 lines
1.3 KiB
C#

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<RestaurantOrderType>
{
[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 void InitializeSubsystem()
{
}
public RestaurantOrderType GetInteractionSubsystemType()
{
return currentRestaurantOrderType;
}
}
}