Hi,
I am making a turn-based game and I want it to change OnClick action for 3 buttons at the beginning of each turn.
So the idea I had for it is to choose 3 random numbers(for example 001, 046, 073), then somehow associate button1 with the first number so it will show icon 001.png and after clicking on it execute method M001() from a script with all of those methods.
Then as you may have expected for button2 icon 046.png plus method M046() and for 3rd button 073.png with M073().
Finally, after clicking on one of them they should disappear until the beginning of next turn.
I would be grateful for some advice or example code. Also, this game is multiplayer so keep that in mind.
You’re going to have 1000 images for all these random numbers?
You’re going to have 1000 different methods??? Do they really do 1000 different things or can’t you just use method different method parameter values?
Of course, it won’t be 1000 maybe like a hundred or so. I made it 3 digits just in case I get over 100 so it would be consistent looking.
And no I can’t use different method parameter values because those methods are too different - they are something like spells (some of them spawn something others change value somewhere…).
Nevermind. Solved it.