当前位置:网站首页>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;
});边栏推荐
猜你喜欢
随机推荐
mysql 中 in 的用法
Redis分布式锁入门
“蔚来杯“2022牛客暑期多校训练营4
PostgreSQL learning summary (11) - PostgreSQL commonly used high-availability cluster solutions
Jenkins--基础--07--Blue Ocean
MySQL Workbench 安装及使用
TiFlash 存储层概览
How Engineers Treat Open Source --- A veteran engineer's heartfelt words
类和对象【下】
AI目标分割能力,无需绿幕即可实现快速视频抠图
Seleniu screenshots code and assign name to the picture
LeetCode_2357_使数组种所有元素都等于零
etcd implements large-scale service governance application combat
天地图给多边形加标注
PyCharm使用教程(较详细,图+文)
三维体尺测量
Redis分布式锁
Flink 系统性学习笔记系列
Three types of [OC learning notes] Block
PyCharm usage tutorial (more detailed, picture + text)



![[OC学习笔记]ARC与引用计数](/img/56/033cfc15954567d63d987d91ca8d63.png)




![[OC学习笔记]weak的实现原理](/img/39/d6183deda2a530b78a0883e0f60153.png)
