当前位置:网站首页>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.预览效果


边栏推荐
- Haskell 配置 VS code 开发环境 (2022年6月)
- 成功解决(机器学习分割数据问题):ModuleNotFoundError: No module named ‘sklearn.cross_validation‘
- LeetCode每日一题:实现strStr()
- Excel使用过程中的参考资料
- HandlerThread使用及原理
- 学习通否认 QQ 号被盗与其有关:已报案;iPhone 14 量产工作就绪:四款齐发;简洁优雅的软件早已是明日黄花|极客头条
- JVM底层又是如何实现synchronized的
- Analysis of basic structure and working principle of slip ring
- Comics | goodbye, postman! One stop collaboration makes apipost more fragrant!
- Mask wearing face data set and mask wearing face generation method
猜你喜欢

Matrix compression

Cross domain problem of canvas drawing caused by background image cache

Leetcode daily question: implementing strstr()

Haskell 配置 VS code 开发环境 (2022年6月)
【架构师(第三十八篇)】 服务端开发之本地安装最新版 MySQL 数据库

旋轉接頭安裝使用注意事項

674. longest continuous increasing sequence

Baidu online disk login verification prompt: unable to access this page, or the QR code display fails, the pop-up window shows: unable to access this page, ensure the web address....

Document management.

The magical zero knowledge proof can not only keep secrets, but also make others believe you!
随机推荐
戴口罩人脸数据集和戴口罩人脸生成方法
Nodejs installation and download
Excel使用过程中的参考资料
【SV 基础】queue 的一些用法
利用verilogA模块采样
10. Yolo series
Xiaobai's e-commerce business is very important to choose the right mall system!
[image registration] improved SAR image registration based on sar-sift with matlab code
[agile 5.1] core of planning: user stories
oracle 去掉html标签
养老年金险是理财产品吗?预期收益在哪看?
MySQL high availability dual master synchronization
Roson's QT journey 80 qurl class
请问同花顺上开户安全吗
JDBC连接、断开数据库的封装
Leetcode daily question: implementing strstr()
同期群分析是什么?教你用 SQL 来搞定
旋轉接頭安裝使用注意事項
浏览器缓存库设计总结(localStorage/indexedDB)
Is pension insurance a financial product? Where is the expected return?