using System; using UnityEngine; using UnityEngine.UI; namespace DDD.Restaurant { public class BillHud : MonoBehaviour, IEventHandler { [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); } } }