17 lines
565 B
JavaScript
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));
|
|
}
|
|
}); |