| 1234567891011121314151617181920212223242526272829303132 |
- 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.smalliconUrl) {
- Common.loadImage(Define.GameHttpUrl+data.smalliconUrl,function(texture){
- var sprite = new cc.SpriteFrame(texture);
- self.bg.getComponent(cc.Sprite).spriteFrame = sprite;
- })
- }
- },
- });
|