void OnMouseDown() { //Set the payment value print(value.ToString("C") + " is selected."); manager.SetPaymentValue(value); //Highlight the button HighlightButton(); }
void Awake() { manager = FindObjectOfType <VendingMachineManager>(); buttons = FindObjectsOfType <PaymentSelectionButton>(); if (value == 5f) { manager.SetPaymentValue(value); HighlightButton(); } }