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

cocos2dx-2.1.5 ddz-游戏开发之旅(二)初接触

2014年02月01日 ⁄ 综合 ⁄ 共 191字 ⁄ 字号 评论关闭

1.创建模版背景

CCSprite* pSprite = CCSprite::create("bg.png");

//判断是否正确执行
CC_BREAK_IF(! pSprite);

//背景分布位置

pSprite->setPosition(ccp(size.width/2, size.height/2-50));

//执行  参数 0 为置于第一层

this->addChild(pSprite, 0);

2.

抱歉!评论已关闭.