1
'setIsRelativeAnchorPoint:' 在CCLayerColor.m棄用
如果((個體= [超級INIT]))
{
[self setIsRelativeAnchorPoint:YES];
self.anchorPoint = ccp(0.5,0.5);
}
但提示方法deprecated.Who知道如何找到不被棄用的方法?
'setIsRelativeAnchorPoint:' 在CCLayerColor.m棄用
如果((個體= [超級INIT]))
{
[self setIsRelativeAnchorPoint:YES];
self.anchorPoint = ccp(0.5,0.5);
}
但提示方法deprecated.Who知道如何找到不被棄用的方法?
試試這個:
// v1.0
node.isRelativeAnchorPoint = YES;
// v2.0
node.ignoreAnchorPointForPosition = NO; // The value is "negated"
是的,謝謝您。這是正確的 – user1297301
看看cocos2d.h,告訴我你的cocos2d版本 – zeiteisen
V2.0.0的cocos2d-RC2 – user1297301
我認爲新的等效是ignoreAnchorPointForPosition – zeiteisen