![]() In a similar way dividing the current frame by with number of columns and casting it to an integer before multiplying it by the frame height, gives us how far down the sprite sheet that frame is. Sprite sprite =, ang, c) īy taking the modulo of the number of columns in the sprite sheet and multiplying it by the frame width, we have how far across the sprite sheet that frame is. With the frame size and number of columns we have everything we need to render from a sprite sheet. The way frame size is handled means we are limited to the same size for each frame, but that small limitation makes things much easier… the framesWide member refers to the number of columns there are in a sprite frame, for example this animation of a flower opening is arranged in four columns.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |