Ok so I have been testing things out lately to see how can I use a single method to change the values for int mana and health. I do not know if this is the right way to do it, but its working very well in my case.
For those who maybe are looking for a practical answer, it might be useful:
Basically I added a new int called CE, where everytime I called an upgrade, I equalizet it wiht the passing value (val).
public void upgrade1(int val){
if(val < 5)
val = val + 1;
CE = val;
}
when I clicked the button I set the mana and health (each individually) to be equal with CE. From there I only had to set the mana and health value to CE. The values now can be changed particularry on their own without modifying values that are not ment to be modified.
Thanks for your support and collaboration community!
solved how can I increase the int through a method?