I made a game like catnap but now i want a func that counts the blocks when you tap it.
So like i can create a reward system when you complete the game destroying 4 blocks you get 2 stars if you can complete the game destroying 2 blocks you get 3 stars something like that. I was experimenting with code so i made a var: " points: Int = 0 " and then in the func where you tapp the block “points = +1” and then i print it out in the log so i can see if it worked and it worked but it does not count the blocks. Every time i destroy a block it says 1. It does not add up.
I hope you understand my text. I would really appreciate your help.
With best regards