创建不同方向的动画函数
来源:互联网 发布:灵界室友网络剧 编辑:程序博客网 时间:2024/05/04 12:16
CCAnimation* createAnimationByDirection(HeroDirection direction)
{
CCTexture2D *heroTexture = CCTextureCache::sharedTextureCache()->addImage("hero.png");
CCSpriteFrame *frame0, *frame1, *frame2, *frame3;
frame0 = CCSpriteFrame::createWithTexture(heroTexture, cocos2d::CCRectMake(32*0, 32*direction, 32, 32));
frame1 = CCSpriteFrame::createWithTexture(heroTexture, cocos2d::CCRectMake(32*0, 32*direction, 32, 32));
frame2 = CCSpriteFrame::createWithTexture(heroTexture, cocos2d::CCRectMake(32*0, 32*direction, 32, 32));
frame3 = CCSpriteFrame::createWithTexture(heroTexture, cocos2d::CCRectMake(32*0, 32*direction, 32, 32));
CCArray* animFrames = new CCArray(4);
animFrames->addObject(frame0);
animFrames->addObject(frame1);
animFrames->addObject(frame2);
animFrames->addObject(frame3);
CCAnimation* animation = new CCAnimation();
animation->createWithSpriteFrames(animFrames, 0.2f); //0.2f表示每帧动画间的间隔
animFrames->release();
return animation;
}
- 创建不同方向的动画函数
- 从屏幕不同方向进入的动画
- ArcGIS教程:不同方向的经验半变异函数
- 设置转场动画的方向
- c++打印不同方向的三角形
- C++不同发展方向的知识点储备
- 不同浏览器通用的创建xmlhttp对象函数
- 1.Animation的使用 - 使用动画创建一个不同的登陆界面
- 动画编辑器和动画引擎的不同
- 创建avi视频sin函数的动画.m
- cartoon(不同的动画效果)
- CALayer的动画创建
- js判断鼠标滑轮滚动方向并根据滚动的方向触发不同的事件
- UIImage 圆角以及不同方向的圆角
- 第三弹 不同方向旋转的三角形和矩形
- 根据python的不同职业方向确定学习内容
- ios动画旋转方向
- 设置动画方向
- Gentoo 管理快速入门手册
- 玩转DevExpress.XtraGrid.view.gridview
- java中无符号类型处理(转载从网络)
- Android 4.2源码的下载和编译环境的安装及源码的编译
- 输入url,后台都做了哪些工作
- 创建不同方向的动画函数
- 串口收发最高位为0
- Android: Activity LifeCycle
- 再次写给我们这些浮躁的程序员
- Oracle 学习笔记7 —— 权限管理2
- 阿里巴巴2013实习生前端笔试题5月19号版
- linux串口通信参数宏详解实例
- 二分查找
- NSIS:.NET Runtime Library检测和本地安装