25 lines
643 B
C#
25 lines
643 B
C#
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using UnityEngine;
|
|
|
|
namespace BlueWater.Tycoons
|
|
{
|
|
public class ServingTableController : MonoBehaviour
|
|
{
|
|
[SerializeField]
|
|
private Transform _servingTableRoot;
|
|
|
|
[SerializeField]
|
|
private List<ServingTable> _servingTables;
|
|
|
|
private void Awake()
|
|
{
|
|
_servingTables = _servingTableRoot.GetComponentsInChildren<ServingTable>().ToList();
|
|
}
|
|
|
|
public ServingTable FindEmptyServingTable()
|
|
{
|
|
return _servingTables.FirstOrDefault(element => element.CurrentPickupItem == null);
|
|
}
|
|
}
|
|
} |