hi everyone,
Just like to build a human sprite with head, leg, hand and so on. the head or the leg have a relative sprite, and then i could change part of human body in an easy way.
I found out that the CCSprite class have addChild function, but the child sprite always on the left bottom of the main sprite, how to solve it?
and CCSpriteBatchNode seem like a solution to it, but I have been told that CCSpriteBatchNode only support texture form one texture file.
Should I need to write a new kind of CCSprite class myself? If i should, could you give me some advises?
thank you!
you need to use setPosition on the child sprite to add it at the desired location .
actually, i have use setPosition func by using lua, just add a new sprite to the main sprite as child, and it didn’t work, the position is not correct, no matter how i change the position value, it just always on the left bottom of main sprite.