+ ItemTable excel, json, so 수정 + 손님 추가 -> 빈 자리 찾기 -> 음료 주문 -> 퇴장 구현 + 일부 BehaviorTree Action 변경
29 lines
768 B
C#
29 lines
768 B
C#
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using BlueWater.Utility;
|
|
using UnityEngine;
|
|
|
|
namespace BlueWater
|
|
{
|
|
public class CustomerTableManager : MonoBehaviour
|
|
{
|
|
[SerializeField]
|
|
private List<CustomerTable> _customerTables;
|
|
|
|
public void RegisterTable(CustomerTable table)
|
|
{
|
|
Utils.RegisterList(_customerTables, table);
|
|
}
|
|
|
|
public void UnregisterTable(CustomerTable table)
|
|
{
|
|
Utils.UnregisterList(_customerTables, table);
|
|
}
|
|
|
|
public TableSeat FindEmptySeat()
|
|
{
|
|
return _customerTables.Select(customerTables => customerTables.FindEmptySeat())
|
|
.FirstOrDefault(emptySeat => emptySeat != null);
|
|
}
|
|
}
|
|
} |