当前位置:网站首页>cocoscreator动态切换SkeletonData实现骨骼更新
cocoscreator动态切换SkeletonData实现骨骼更新
2022-06-29 00:42:00 【RemoteDev】
演示
cocoscreator动态切换SkeletonData实现骨骼更新
1.在资源管理器中添加resources文件夹,并导入girl和spineboy两个骨骼动画的资源

2.NodeSke节点中的sp.Skeleton组件中的Skeleton Data默认为gril骨骼动画中的mix-and-match-pro.json

3.实现动态加载SkeletonData并设置动画
resources.load('spineboy/spineboy-pro',sp.SkeletonData,(err,skedata)=>{
this.SkeObj.skeletonData = skedata;
this.SkeObj.setAnimation(0,'walk',true);
});
4.预览效果


边栏推荐
- 利用verilogA模块采样
- 674. longest continuous increasing sequence
- Comparison between winding process and lamination process
- Résumé de Manon, 25 ans, diplômé en trois ans
- 成功解决(机器学习分割数据问题):ModuleNotFoundError: No module named ‘sklearn.cross_validation‘
- Introduction to JVM working principle
- Click hijack: X-FRAME-OPTIONS is not configured
- [agile 5.1] core of planning: user stories
- How to guarantee the delivery quality through the cloud effect test plan
- Basic use of Chrome browser
猜你喜欢

【leetcode】1719. Number of schemes for reconstructing a tree

光纤滑环价格过高的原因

Pinhole camera with added lens

卷绕工艺与叠片工艺的对比

12. Détection d'objets Mask rcnn

Precautions for installation and use of rotary joint
How does the JVM bottom layer implement synchronized

Single machine multi instance MySQL master-slave replication

Comparison between winding process and lamination process

How to guarantee the delivery quality through the cloud effect test plan
随机推荐
Is it safe to open an account on great wisdom
大型网站架构基础之笔记
启牛学堂帮忙开证券账户是安全靠谱的吗?个人如何开
畢業三年的25歲碼農總結
10、YOLO系列
JVM工作原理介绍
【UVM】我的 main_phase 都跑完了,为啥 case 无法退出?太不讲道理!
Introduction to four MySQL engines
Two fresh students: one is practical and likes to work overtime, and the other is skilled. How to choose??
HandlerThread使用及原理
【SV 基础】queue 的一些用法
运营级智慧校园系统源码 智慧校园小程序源码+电子班牌+人脸识别系统
sql入门
[image registration] improved SAR image registration based on sar-sift with matlab code
websocket-js连接如何携带token验证
Ensemble de données sur les visages masqués et méthode de génération des visages masqués
How the slip ring motor works
Mysql的四种引擎介绍
MySQL high availability dual master synchronization
使用.Net驱动Jetson Nano的OLED显示屏