没有合适的资源?快使用搜索试试~ 我知道了~
动画UI编辑的相关代码,是关于CCArmature在cocosStudio的运用
资源推荐
资源详情
资源评论
头文件引用:#include "cocos-ext.h"
命名空间:USING_NS_CC_EXT;
加载方式
CCArmatureDataManager::sharedArmatureDataManager()->addArmatureFileInfo
("Hero0.png","Hero0.plist","Hero.ExportJson");
CCArmatureDataManager::sharedArmatureDataManager()->addArmatureFileInfoAsync
("Hero.ExportJson",this,schedule_selector(HelloWorld::dataLoaded)); //回调函数的参数类型为float
创建
CCArmature* armature=CCArmature::create("Hero");
播放方式
1.armature->getAnimation()->play("run");
2.armature->getAnimation()->playWithIndex(0);
改变播放速度
armature->getAnimation()->setSpeedScale(3.0f);
播放完成回调
armature->getAnimation()->setMovementEventCallFunc
(this,movementEvent_selector(HelloWorld::moment));
回调函数参数( CCArmature * armature, MovementEventType type, const char * movementID )
命名空间:USING_NS_CC_EXT;
加载方式
CCArmatureDataManager::sharedArmatureDataManager()->addArmatureFileInfo
("Hero0.png","Hero0.plist","Hero.ExportJson");
CCArmatureDataManager::sharedArmatureDataManager()->addArmatureFileInfoAsync
("Hero.ExportJson",this,schedule_selector(HelloWorld::dataLoaded)); //回调函数的参数类型为float
创建
CCArmature* armature=CCArmature::create("Hero");
播放方式
1.armature->getAnimation()->play("run");
2.armature->getAnimation()->playWithIndex(0);
改变播放速度
armature->getAnimation()->setSpeedScale(3.0f);
播放完成回调
armature->getAnimation()->setMovementEventCallFunc
(this,movementEvent_selector(HelloWorld::moment));
回调函数参数( CCArmature * armature, MovementEventType type, const char * movementID )
资源评论
qq_24082435
- 粉丝: 0
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功