cocos2d CCScrollView 解析

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

相关文章

    本文实践自 RayWenderlich、Ali Hafizji 的文章《...
Cocos-code-ide使用入门学习地点:杭州滨江邮箱:appdevzw@1...
第一次開始用手游引擎挺激动!!!进入正题。下载资源1:从C...
    Cocos2d-x是一款强大的基于OpenGLES的跨平台游戏开发...
1.  来源 QuickV3sample项目中的2048样例游戏,以及最近《...
   Cocos2d-x3.x已经支持使用CMake来进行构建了,这里尝试...