CapersProject/Assets/02.Scripts/Tycoon/CustomerTableManager.cs
Nam Tae Gun b6e7e5dca3 #7 타이쿤 업데이트 및 전투 아이템 수정
+ 전투에서 사용되는 Item 오브젝트의 InteractionUi의 camera를 UiCamera로 연동
+ Item의 드랍 방식을 같은 위치에서 랜덤한 위치로 흩뿌리는 방식으로 변경
+ 술통, 쓰레기통 상호작용 추가
+ 손님이 음료를 요구할 때, 음료 전달 기능 추가
+ 가구 Opaque Unlit으로 재질 변경
2024-07-03 03:27:56 +09:00

29 lines
776 B
C#

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