cocos2d CCScrollView 解析

来源:互联网 发布:网络直播十大灵异事件 编辑:程序博客网 时间:2024/04/20 16:10

CCNode 重要属性:

m_obAnchorPoint = CCPointZero  m_obPosition = CCPointZero #"whole screen objects. like Scenes and Layers, should set m_bIgnoreAnchorPointForPosition to true"m_bIgnoreAnchorPointForPosition = falsem_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

0 0
原创粉丝点击