void Destroy() { OrderSlot_v1 OrderSlot = GetComponentInChildren <OrderSlot_v1>(); if (OrderSlot != null) { OrderSlot.onOrderInserted -= HandleOrderInserted; OrderSlot.onOrderRemoved -= HandleOrderRemoved; } else { Debug.Log("No Order Slot associated with the Order Visualizer"); } }
void Awake() { OrderSlot_v1 OrderSlot = GetComponentInChildren <OrderSlot_v1>(); if (OrderSlot != null) { OrderSlot.onOrderInserted += HandleOrderInserted; OrderSlot.onOrderRemoved += HandleOrderRemoved; } else { Debug.Log("No Order Slot associated with the Order Visualizer"); } GetComponentInChildren <ButtonInteractable_v1>().OnButtonRelease += HandleButtonClick; }