CCNode 重要属性:
m_obAnchorPoint = CCPointZero
m_obPosition = CCPointZero
#"whole screen objects. like Scenes and Layers,should set m_bIgnoreAnchorPointForPosition to true"
m_bIgnoreAnchorPointForPosition = false
m_obContentSize = CCSizeZero
CCLayer 和 CCScene 继承与 CCNode
并更改了上述部分属性:
**CCLayer:**
m_bIgnoreAnchorPointForPosition = true
setAnchorPoint = ccp(0.5,0.5)
m_obContentSize = winSize
#CCLayer加入了对外部事件的处理如触摸,重力,菜单按钮。
#默认CCLayer不处理外部事件
m_bTouchEnabled(false),m_bAccelerometerEnabled(false),m_bKeypadEnabled(false),##CCScene:##
m_bIgnoreAnchorPointForPosition = true
setAnchorPoint = ccp(0.5,0.5)
m_obContentSize = winSize
CCScrollView 继承自 CCLayer ,则继承下来的属性又 锚点为m_obAnchorPoint = ccp(0.5 0.5) 并且ignoreAnchorPointForPosition = true