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

29 lines
771 B
C#

using System.Collections.Generic;
using System.Linq;
using UnityEngine;
namespace BlueWater.Tycoons
{
public class CustomerTable : MonoBehaviour
{
[SerializeField]
private List<TableSeat> _tableSeats;
private void OnEnable()
{
TycoonManager.Instance.CustomerTableManager.RegisterTable(this);
}
private void OnDisable()
{
if (!TycoonManager.Instance) return;
TycoonManager.Instance.CustomerTableManager.UnregisterTable(this);
}
public TableSeat FindEmptySeat()
{
return _tableSeats.FirstOrDefault(tableSeat => !tableSeat.IsReserved && !tableSeat.IsOccupied && tableSeat.IsCleaned);
}
}
}