Is it possible to load different images in an image file with grid?

Good day to all,

I am new in cocos2d-x development and I wonder if it would be possible to assign a grid
as attached to a sprite, then depending on state we just point to a certain grid element?

I have not used sprite sheets before, Is what I’m talking about similar to sprite sheets?

I have attached a sample image for better view.

Thanks in advance!

:slight_smile:


sprite-sheet-sample.png (104.6 KB)

Yep, it is about sprite sheet.
You can use texture packer to generate a sprite and a plist file.
You can refer to SpriteTest.cpp for the usage.

Thanks! Will look into it. :slight_smile: