40 lines
1.3 KiB
C#
40 lines
1.3 KiB
C#
using System.Threading.Tasks;
|
|
using UnityEngine;
|
|
|
|
namespace DDD
|
|
{
|
|
public class TodayCookwareSlotUiStrategy : IItemSlotUiStrategy
|
|
{
|
|
public void Setup(ItemSlotUi ui, ItemViewModel model)
|
|
{
|
|
if (model == null)
|
|
{
|
|
ui.SetIcon(DataManager.Instance.GetSprite(SpriteConstants.EmptyFoodSpriteKey));
|
|
ui.HideCountText();
|
|
ui.HideMark();
|
|
ui.SetButtonInteractable(false);
|
|
|
|
return;
|
|
}
|
|
|
|
string markSpriteKey = null;
|
|
if (RestaurantState.instance.ManagementState.IsTodayMenuMatched(ui.Model.Id))
|
|
{
|
|
markSpriteKey = SpriteConstants.CheckYesSpriteKey;
|
|
}
|
|
else
|
|
{
|
|
markSpriteKey = SpriteConstants.CheckNoSpriteKey;
|
|
}
|
|
ui.SetIcon(model.ItemSprite);
|
|
ui.HideCountText();
|
|
ui.ShowMark(DataManager.Instance.GetSprite(markSpriteKey)); // TODO : 추후에 장비와 매칭
|
|
ui.SetButtonInteractable(true);
|
|
}
|
|
|
|
public RuntimeAnimatorController GetAnimatorController()
|
|
{
|
|
return RestaurantDataSo.instance.ManagementData.TodayMenuSlotUiAnimatorController;
|
|
}
|
|
}
|
|
} |