| 12345678910111213141516171819202122232425262728293031 |
- 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
- 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;
- })
- }
- },
- });
|