Files
game1/assets/_script/ShowImgScript.js
T
tothvillar e896e2ead4 init
2026-07-09 15:04:14 +08:00

17 lines
565 B
JavaScript

cc.Class({
extends: cc.Component,
properties: {},
start: function () {},
onShowImg_bendi: function (e) {
this.node.getComponent(cc.Sprite).spriteFrame = null;
cc.loader.loadRes(e, function (e, o) {
e || (this.node.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(o));
}.bind(this));
},
onShowImg_server: function (e) {
this.node.getComponent(cc.Sprite).spriteFrame = null;
cc.loader.load(e, function (e, o) {
e || (this.node.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(o));
}.bind(this));
}
});