public void LeaveDispensary() { if (driver != null) { } manager.GetComponent <DispensaryManager>().dispensary.inventory.RefreshInventoryList(false); manager.TruckLeave(order); manager.TryNext(); Destroy(this.gameObject); }
public void SetButtonCallbacks(DeliveryTruck truck) { if (dm == null) { Start(); } VendorManager manager = truck.manager; dm.truck = truck; dm.boxes = truck.boxes; Button[] buttons = buttonPanel.GetComponentsInChildren <Button>(); buttons[0].onClick.AddListener(() => manager.RejectOrder(truck.order)); buttons[1].onClick.AddListener(() => manager.GetComponent <DispensaryManager>().uiManagerObject.GetComponent <UIManager_v3>().CreateOrderPreviewPanel(truck.order)); buttons[2].onClick.AddListener(() => dm.StartReceivingShipment(truck)); }