【发布时间】:2013-06-22 22:08:25
【问题描述】:
下面的代码创建一个精灵并分配锚点和旋转。精灵会旋转很多,有没有办法获得精灵右下角的位置。就像,精灵锚点是(0,1),我可以获得锚点(1,1)的位置点吗?这样即使精灵在旋转,我也总能得到相同的位置?
tempsprite = [CCSprite spriteWithSpriteFrameName:@"image.png"];
tempsprite.rotation += 90;
tempsprite.anchorPoint = ccp(0,1);
tempsprite.position = tempsprite;
[self addChild:tempsprite];
【问题讨论】:
标签: iphone ios objective-c cocoa-touch cocos2d-iphone