private void updateEventPopup(Event currentCard) { EventMessage.text = currentCard.EventText; EventOption1Text.text = currentCard.button1Text; EventOption2Text.text = currentCard.button2Text; //let's try removing all the listeners we created button1.onClick.RemoveAllListeners(); button2.onClick.RemoveAllListeners(); //THIS IS A THING. IT SHOULD BE IT'S OWN METHOD. NAMED AFTER THE THING. button1.onClick.AddListener(delegate { bank.deposit(currentCard.button1MoneyConsequence); }); button2.onClick.AddListener(delegate { Q.pollute(currentCard.button2QConsequence); }); button1.onClick.AddListener(delegate { Q.pollute(currentCard.button1QConsequence); }); }
public void modifyQUsingPTP() { Q.pollute(inv.totalPTP()); }