Cocos2d-x_播放帧动画
来源:互联网 发布:js跨域cookie 编辑:程序博客网 时间:2024/04/30 16:00
void HelloWorld::mcallBack(CCObject *pSend){CCSprite *pSpr = (CCSprite *)pSend;pSpr->removeFromParentAndCleanup(true);}bool HelloWorld::ccTouchBegan(CCTouch *pTouch, CCEvent *pEvent){CCLOG(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>");CCPoint pt = pTouch->getLocation();CCSpriteFrameCache *cache = CCSpriteFrameCache::sharedSpriteFrameCache();cache->addSpriteFramesWithFile("frame_ani/pointer.plist", "frame_ani/pointer.png");CCSprite *light = CCSprite::create();light->setPosition(pt);this->addChild(light);CCArray *spriteArray = CCArray::create();char str[100] = { 0 };for (int i = 1; i <= 9; i++){sprintf(str, "pointer/%02d.png", i);CCSpriteFrame *frame = cache->spriteFrameByName(str);spriteArray->addObject(frame);}CCAnimation *animation = CCAnimation::createWithSpriteFrames(spriteArray, 0.05f);CCAnimate *animate = CCAnimate::create(animation);CCFiniteTimeAction *actSeq = CCSequence::create(animate, CCCallFuncO::create(this, callfuncO_selector(HelloWorld::mcallBack), light), NULL);light->runAction(actSeq);return true;}
0 0
- Cocos2d-x_播放帧动画
- Cocos2d-3.x_创建3D精灵,播放模型动画
- Cocos2d-x_播放音乐和音效
- cocos2d-x 播放帧动画
- Cocos2d-3.x_视频播放(Android和iOS平台)
- cocos2d-x播放序列帧动画
- cocos2d+lua实现帧动画播放
- cocos2d-3.2 逐帧动画播放
- cocos2d循环播放动画
- Cocos2d-x_单点触摸
- Cocos2d-x_多点触摸
- Cocos2d-x_粒子特效
- Cocos2d-3.x_定时器
- cocos2d-x 3.0 帧播放 (帧动画循环播放)
- cocos2d-x播放骨骼动画
- Cocos2d-x 如何播放动画
- Cocos2d播放Cocostudio编辑动画
- Cocos2d-x_定时器(更新函数)
- from(file)用于提交后返回后端执行后的状态(这里是图片的例子)
- C/C++ 笔试、面试题目大汇总2
- Spring中@Async用法总结
- java冒泡排序
- CodeForces 490
- Cocos2d-x_播放帧动画
- 第四周 项目一-三角形类的构造函数(一)
- ListView不同行加载不同布局
- 树转二叉树的过程
- Android Button原理
- 1130-host ... is not allowed to connect to this MySql server
- RichText控件添加到对话框上不能运行的解决方法
- 我的vi命令集
- ADT/Eclipse字体大小、代码自动补全、代码自动对齐的设置