Good day. I make a game. It is necessary when passing a level, to turn on the button, according to the standard it is turned off (enable = false). Title buttons 1 through 12 (i.e. 12 buttons). I have a variable that contains information about where the user stopped. I thought that it was possible to write a cycle that would open all past levels (the buttons would become enable = true) That is, i = 1 From i to {number of levels passed} do the button.name buttons (int line (i)) = enable finish
In the process of implementation of problems. Not enough experience to write just a cycle. Please help.
Loop in ViewController Buttons in Main.storyboard