import Common from '../common/Common'; import Define from '../common/Define' cc.Class({ extends: cc.Component, properties: { bg:cc.Sprite, num:cc.Label, }, clickTable(sender,type) { console.log("clickTable") var num = this.num.string this.parentNode.OnBtnClicked(sender,this.gameid,type,num) }, setGameData(data,parentNode) { var self = this; this.gameid = data.id this.parentNode = parentNode this.num.string = data.gameMoney_money var self = this; if (data.iconUrl) { Common.loadImage(Define.GameHttpUrl+data.iconUrl,function(texture){ var sprite = new cc.SpriteFrame(texture); self.bg.getComponent(cc.Sprite).spriteFrame = sprite; }) } }, });