Let’s say I have three stats: health, stamina, and speed. For each stat, there are buttons to increase or decrease the stat by a specific increment.
For all the ones the increase the stat, I made a different function to increase each stat. My question is this: is there a way for the button to know which stat to increase and have one function for increasing the stats separately, that each button could use the same function?
To continue this example, let’s say late I want to add magic as another stat. I don’t want to have to add another function.
(Note: topics section on this website is acting strange)