24 lines
637 B
C#
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);
|
|
}
|
|
}
|
|
} |