当前位置:网站首页>【cocos creator】spine动画,监听播放结束
【cocos creator】spine动画,监听播放结束
2022-07-23 06:22:00 【烧仙草奶茶】
https://blog.csdn.net/foupwang/article/details/81096863
playSpine: function(animName, loop, callback) {
let spine = this.node.getComponent(sp.Skeleton);
let track = spine.setAnimation(0, animName, loop);
if (track) {
// 注册动画的结束回调
spine.setCompleteListener((trackEntry, loopCount) => {
let name = trackEntry.animation ? trackEntry.animation.name : '';
if (name === animName && callback) {
callback(); // 动画结束后执行自己的逻辑
}
});
}
},
边栏推荐
- 软件测试岗位饱和了?自动化测试是新一代‘offer’技能
- Summary of time complexity( Ο Is the asymptotic upper bound, Ω is the asymptotic lower bound, P, NP, NP hard, NPC problem)
- Talk about "people" in the R & D team
- 射击 第 1-01 课:入门
- Beihui information is 12 years old | happy birthday
- 机器学习,吴恩达逻辑回归
- What happens when you enter the web address and the web page is displayed
- [jzof] 07 rebuild binary tree
- DeFi 永不消亡?
- 太空射击 Part 1: 玩家精灵和控制
猜你喜欢
随机推荐
Successful joint commissioning of Vientiane Aoke and CoDeSys Technology
Talk about study and work -- Qian Xuesen
Numpy: quick start to basic operations
Beifu PLC and C transmit bool array variables through ads communication
Wu Enda machine learning series p31~p42
深入解读 EVM 的生态帝国
QNX修改系统时间
MySQL - composite query external connection
Complex networks - common drawing software and libraries
机器学习,吴恩达逻辑回归
Opencv image processing (medium) image smoothing + histogram
倍福PLC和C#通过ADS通信传输Bool数组变量
倍福PLC和C#通过ADS通信传输String数组类型变量
The relationship between method area, perpetual generation and meta space
NFT 交易市场的格局之变:从一家独大到百家争鸣
Charles抓包工具测试实战
分类模型的评估
第十天笔记
Functional testing to automated testing, sharing ten years of automated testing experience
Beifu PLC -- C ads communication reads variables in the form of notification




![[jzof] 10 Fibonacci series](/img/65/ab5b22b0879644c210abb38b0ce640.png)


![[jzof] 07 rebuild binary tree](/img/c8/5b67a3921afda5323b0d1eea6a78bc.png)

