当前位置:网站首页>cococreator 动态设置精灵
cococreator 动态设置精灵
2022-08-02 08:42:00 【不知道反正就是挺叼】
let that = this;
// 图片路径,注意不带后缀
let resUrl = '123';
cc.loader.loadRes(resUrl, cc.SpriteFrame, function (err, spriteFrame) {
// 设置当前节点的spriteFrame
this.node.getComponent(cc.Sprite).spriteFrame = spriteFrame;
});
边栏推荐
猜你喜欢
随机推荐
day_05_pickel 和 json
【论文阅读】Distilling the Knowledge in a Neural Network
AttributeError: module ‘clr‘ has no attribute ‘AddReference‘
不用Swagger,那我用啥?
Scala类型转换
【微信小程序2】事件绑定
mysqldump --set-gtid-purged=OFF
初学者怎么快速学会SQL
Mysql Mac版下载安装教程
Flink 监控指南 被动拉取 Rest API
了解下C# 多线程
Postman download localization of installation and use
A little bit of knowledge - why do not usually cook with copper pots
RetinaFace: Single-stage Dense Face Localisation in the Wild
shell中计算命令详解(expr、(())、 $[]、let、bc )
Redisson的看门狗机制
What is the function of the import command of the page directive in JSP?
自定义卡包效果实现
How to use postman
What attributes and methods are available for page directives in JSP pages?