现在的位置: 首页 > 综合 > 正文

更改anchorPoint默认值

2013年04月08日 ⁄ 综合 ⁄ 共 297字 ⁄ 字号 评论关闭

项目锚点要用坐下角,小白摸了一小时,给更白的同仁参考

ccnode.h 说明:   

// If true, the Anchor Point will be (0,0) when you position the CCNode.
// Used by CCLayer and CCScene
bool m_bIgnoreAnchorPointForPosition;

ccnode.cpp 更改:
CCNode::CCNode(void):
...
// , m_bIgnoreAnchorPointForPosition(false)改为
, m_bIgnoreAnchorPointForPosition(true)

...

最后从新编译libcocos2d库

抱歉!评论已关闭.