B
B
Bekzod Kakhramonov2020-06-08 20:49:09
Android
Bekzod Kakhramonov, 2020-06-08 20:49:09

How to change a sprite multiple times in a few clicks?

I have 6 sprites ( land; land_(brake1); land_(brake2); land_(brake3); etc. I want the land sprite to change to land_(brake1) when clicked . If you click again, then from land_(brake1) to land_(brake2) , etc. Please help, I will be very grateful!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
DanielMcRon, 2020-06-08
@DanielMcRon

Make a variable that will count the number of clicks. You can add this number to one common name like yours, or throw these sprites into an array and by index

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question