当前位置:网站首页>cococreator dynamically set sprite
cococreator dynamically set sprite
2022-08-02 09:08:00 【Don't know is very diao anyway】
let that = this;// Image path, pay attention to no suffixlet resUrl = '123';cc.loader.loadRes(resUrl, cc.SpriteFrame, function (err, spriteFrame) {// Set the spriteFrame of the current nodethis.node.getComponent(cc.Sprite).spriteFrame = spriteFrame;});
边栏推荐
猜你喜欢
随机推荐
Rust 从入门到精通03-helloworld
OneNote Tutorial, How to Create More Spaces in OneNote?
WebGPU 导入[1] - 入门常见问题与个人分享
MySQL ODBC驱动简介
HCIA动态主机配置协议实验(dhcp)
小康股份更名赛力斯,如何走出一条高端产品的“丝绸之路”?
Jetpack Compose 中的状态管理
day_05_pickel 和 json
pnpm:简介
百数应用中心——选择一款适合企业的标准应用
How to use postman
In a recent build figure SLAM, and locate the progress
不用Swagger,那我用啥?
主流监控系统工具选型及落地场景参考
Qt读取文件中内容(通过判断GBK UTF-8格式进行读取显示)
数据库mysql
openpyxl 单元格合并
Jenkins--基础--6.1--Pipeline--介绍
What is the function of the import command of the page directive in JSP?
tf.where使用