admin 管理员组文章数量: 1086796
图片绘制
一般使用CCSprite
四步骤:
1、初始化
2、检测
3、设置坐标点
4、加入当前图层
代码:
// Add add a splash screen, show the cocos2d splash image.CCSprite* pSprite = CCSprite::create("test.png");CC_BREAK_IF(! pSprite);// Place the sprite on the center of the screenpSprite->setPosition(ccp(size.width/2, size.height/2));// Add the sprite to HelloWorld layer as a child layer.this->addChild(pSprite, 0);
本文标签: 图片绘制
版权声明:本文标题:图片绘制 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.roclinux.cn/b/1687930419a158796.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论