Hi,
I need some efficient coding help for my problem.
My script goes like this,
void OnGUI ()
{
if (GUI.Button(0, 0.....))
playerSpeed += 10;
if (GUI.Button(0, 50,.....))
bulletSpeed += 10;
}
That may seem simple enough. Now imagine copy pasting that GUI.Button for about 50 times.
My question is, I want to make sure that the same button is unclickable if it has been clicked before.
The most no-brainer way, is the most troublesome way, where I declare 50 bools, one for each, so it does nothing when clicked. But I’m sure there is a much efficient way of doing this.
Any ideas to help?
Thanks in advance!