ProjectDDD/Assets/_DDD/_Scripts/Restaurant/Ui/Hud/BillHud.cs
2025-08-29 16:51:48 +09:00

24 lines
637 B
C#

using System;
using UnityEngine;
using UnityEngine.UI;
namespace DDD.Restaurant
{
public class BillHud : MonoBehaviour, IEventHandler<RestaurantOrderEvent>
{
[SerializeField] private RectTransform _billItemsLayoutTransform;
[SerializeField] private GameObject _billItemPrefab;
private void Start()
{
EventBus.Register(this);
Utils.DestroyAllChildren(_billItemsLayoutTransform);
}
public void HandleEvent(RestaurantOrderEvent evt)
{
var billItem = Instantiate(_billItemPrefab, _billItemsLayoutTransform);
}
}
}