Hello everyone,
I am trying to find a way to display numbers as sprites (with animations). This is for a math app where I need to be able to use the numbers for calculation as int and display everything with sprite.
I am quite unsure how to design the logic as simple and versatile as possible.
I would like to have 10 sprites, from 0 to 9 and be able to use them to display any int number in real time.
I can do that easily for numbers from 0 to 9, but when the int numbers are 10 or 100
it become more tricky :
for 15, I would need to know it is made of 2 numbers : 1 and 5
create a game object with 2 children
use the sprite nammed 1 for the first child,
translate the next object to the right to have some space in between
use the sprite nammed 5 for the second child,
Is there an elegant method to work with numbers this way, without using to much ressource (creating and destroying object...) ?
Any help would be really appreciated