'setIsRelativeAnchorPoint:'已弃用

时间:2012-06-23 11:22:23

标签: math cocos2d-iphone deprecated

在CCLayerColor.m

if((self = [super init]))

{


    [self setIsRelativeAnchorPoint:YES];
    self.anchorPoint = ccp(0.5,0.5);

}

但是提示方法已弃用。谁知道如何找到不推荐使用的方法?

1 个答案:

答案 0 :(得分:1)

试试这个:

// v1.0
node.isRelativeAnchorPoint = YES;

// v2.0
node.ignoreAnchorPointForPosition = NO;  // The value is "negated"