71 lines
1.9 KiB
C#
71 lines
1.9 KiB
C#
using System;
|
|
using Sirenix.OdinInspector;
|
|
using UnityEngine;
|
|
|
|
namespace BlueWater.Uis.Restaurant
|
|
{
|
|
public class CookMenuUi : PopupUi
|
|
{
|
|
[Title("프리팹")]
|
|
[SerializeField]
|
|
private TodayMenuButton _todayMenuButtonPrefab;
|
|
|
|
[SerializeField]
|
|
private CraftRecipeButton _craftRecipeButtonPrefab;
|
|
|
|
[Title("컴포넌트")]
|
|
[SerializeField]
|
|
private GameObject _todayMenus;
|
|
|
|
[SerializeField]
|
|
private GameObject _unlockedCraftRecipes;
|
|
|
|
[Title("오늘의 메뉴")]
|
|
private int _maxTodayMenuCount = 6;
|
|
|
|
private void Awake()
|
|
{
|
|
// 더미 데이터 삭제
|
|
foreach (Transform element in _todayMenus.transform)
|
|
{
|
|
if (element)
|
|
{
|
|
Destroy(element.gameObject);
|
|
}
|
|
}
|
|
|
|
foreach (Transform element in _unlockedCraftRecipes.transform)
|
|
{
|
|
if (element)
|
|
{
|
|
Destroy(element.gameObject);
|
|
}
|
|
}
|
|
}
|
|
|
|
private void Start()
|
|
{
|
|
for (int i = 0; i < _maxTodayMenuCount; i++)
|
|
{
|
|
TodayMenuButton todayMenuButton = Instantiate(_todayMenuButtonPrefab, _todayMenus.transform);
|
|
todayMenuButton.RegisterButtonListener(OnTodayMenuClick);
|
|
}
|
|
|
|
// for (int i = 0; i < _maxTodayMenuCount; i++)
|
|
// {
|
|
// CraftRecipeButton craftRecipeButton = Instantiate(_craftRecipeButtonPrefab, _unlockedCraftRecipes.transform);
|
|
// craftRecipeButton.RegisterButtonListener(OnCraftRecipe);
|
|
// }
|
|
}
|
|
|
|
private void OnTodayMenuClick()
|
|
{
|
|
|
|
}
|
|
|
|
private void OnCraftRecipe()
|
|
{
|
|
|
|
}
|
|
}
|
|
} |