CapersProject/Assets/02.Scripts/Tycoon/CustomerTableController.cs
Nam Tae Gun 04fbc8c7d4 #7 상호작용 가구 추가 중
+ FireWood, Pot, PowerSwitch 가구 추가
+ GameTimeData 추가
2024-07-09 05:06:22 +09:00

29 lines
779 B
C#

using System.Collections.Generic;
using System.Linq;
using BlueWater.Utility;
using UnityEngine;
namespace BlueWater.Tycoons
{
public class CustomerTableController : 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);
}
}
}