Hello Guys,
I am trying to do mobile action game with a card system. I have a 8 different card in array as a text and they are calling function like a skill system. When game start system will shuffle deck and pick 4 card from inside, remove them and add to last of array as you can see downside. After use skills (buttons) if stamina is enough function will work and card will go to last index of array. Everything is working but when i try to start with 4th button ( All system is same) its always going infinite loop. When i press 1 or 2 or 3 its working and after that i can press 4th and its working but if i choose 4th button for a first card its crashing. I am sharing all system to look. I try to do for 5 days and couldnt found please help me and if you can share me your experiences about these systems to more optimize. If you want i can give more information.
Thanks A Lot!