i have a sprite sheet called "words sprites.png" and it has the images of all numbers (0-9) next to each other. In my program i have a int called score which holds my current score, it begins at 0. I have a class called Others which i am trying to use to display the score by using the images on the sprite sheet. This needs to work even if the score is bigger than 1 digit, so if the score = 1290 the Others class's image will display 1290 using the images in my sprite sheet. how do i do this? pls provide an example code :)
the sheet displays 0-9 in a row with each digit being the size of 7x7 pixels. Each digit in the sprite sheet has a 1 pixel spacing in between (included in the 7x7 box).