so i remember that there might have been something about this on the forum, but cannot find it now. so a clean question cannot hurt.
i have a card with two faces, both a mesh. when it is turned, currently i remove from stage the visible side and add to stage the hidden side (when the card is halfway in turning). when turning back, i repeat this the opposite way. etc, this happens all the time during the game with many such cards.
would it be more efficient to not add/remove repeatedly, but instead setvisible true/false the cardside-meshes repeatedly?
thanks
Comments
The only difference is that setVisible(false) would still make element clickable.
I assume that you animate turning over a card by controlling the scaleX or scaleY, in my understanding, you could even left it at 0 value (thus it won't be visible and clickable.)
Likes: keszegh
"unless you are traversing all the cards in hierarchy, the the least of them there are, the faster it will be."
Fragmenter - animated loop machine and IKONOMIKON - the memory game
i don't see the 'accept answer' icon anymore. perhaps it was useless anyway as there are multiple answers.
Fragmenter - animated loop machine and IKONOMIKON - the memory game