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

44 lines
1.1 KiB
JavaScript

cc.Class({
extends: cc.Component,
properties: {
bj: cc.Sprite,
icon: cc.Sprite,
tile: cc.Label,
desc: cc.Label,
closeBtn: cc.Node
},
InitData: function (e, o, t, i, n, a) {
var c = this;
if (e) {
cc.loader.load(e, function (e, o) {
c.bj.spriteFrame = new cc.SpriteFrame(o);
});
this.tile.string = t;
this.desc.string = i;
console.log("show chaping ui1");
} else {
cc.loader.load(o, function (e, o) {
c.icon.spriteFrame = new cc.SpriteFrame(o);
});
this.tile.string = t;
this.desc.string = i;
console.log("show chaping ui2");
}
this.adCallBackquit = n;
this.adCallBacktouch = a;
console.log("show chaping end");
},
onLoad: function () {},
start: function () {
this.closeBtn.scale = window.ServerConfigBd.closeBtnScale;
},
update: function (e) {},
touchGGBtn: function () {
console.log("touchGGBtn");
this.adCallBacktouch();
},
quitBtn: function () {
console.log("touchGGBtn quitBtn");
this.adCallBackquit();
}
});