CapersProject/Assets/02.Scripts/BlueWater/Tycoon/ServingTableController.cs

25 lines
642 B
C#
Raw Normal View History

2024-10-15 18:01:16 +00:00
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
2025-02-10 02:13:46 +00:00
namespace DDD.Tycoons
2024-10-15 18:01:16 +00:00
{
public class ServingTableController : MonoBehaviour
{
[SerializeField]
private Transform _servingTableRoot;
[SerializeField]
private List<ServingTable> _servingTables;
private void Awake()
{
2025-02-24 11:55:35 +00:00
_servingTables = _servingTableRoot.GetComponentsInChildren<ServingTable>().ToList();
2024-10-15 18:01:16 +00:00
}
2024-10-20 17:21:39 +00:00
2025-02-24 11:55:35 +00:00
public ServingTable FindEmptyServingTable()
{
return _servingTables.FirstOrDefault(element => element.CurrentCraftRecipeData == null);
}
2024-10-15 18:01:16 +00:00
}
}