Hi
Seriously, I looked at the AtlasSpriteTest for over an hour now, and I really do not get it.
How do I tell the AtlasSpriteManager where to find a single sprite in my png file ???
What do I miss ?
.emc
A fast, easy to use, free, and community supported 2D game engine
Hi
Seriously, I looked at the AtlasSpriteTest for over an hour now, and I really do not get it.
How do I tell the AtlasSpriteManager where to find a single sprite in my png file ???
What do I miss ?
.emc
Well, thx, even if I actually was able to put my AtlasSprite on my Scene.
The question was how do i actually say which part of the Atlas is a particular sprite,.... BUT doing it again I "kinda" figured.
CGRectMake(x_start_position, y_start_position, width_of_Sprite, height_of_sprite) is what I was missing to understand. What did confuse me here was that the AltasSprite in the AltasTest was put together with the Animation (at least the part I was looking at for guidance) and the creation of the AtlasSprite was all the same. Maybe it was just to late to see that..... :)
So all I need to do is to make some kinda of map that tells me where I find which sprite. Anyone has an example how to do this ?
Thanks again for the slap on my forehead to see the obvious.
.emc
You can use the tool mentioned in this post to create both the sprite sheet png file and the "map" file.
Then jump to this post (same thread) to get some code to recreate AtlasSprites from the png and the map.
You must log in to post.