开发者

Get trimmed size of of CCSprite

I use a Zwoptex spritesheet+plist with trimmed sprite elements inside of the texture. From what i understand in order to not mess up animations cocos uses the "spriteSourceSize" and gives all sprites this size.

The question is how do i get the trimmed size from the sprite? "spriteSize" plist entry as op开发者_如何学编程posed to the "spriteSourceSize"...


Found it!

"textureRect" property.

http://www.cocos2d-iphone.org/api-ref/0.99.0/interface_c_c_sprite.html#aa793e1433058539e5664ffd3533ab928

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜