123456789101112131415161718192021222324252627282930313233343536373839404142 |
- import ResMgr from "../base/ResMgr";
- cc.Class({
- extends: cc.Component,
- properties: {
- atlasCoin: cc.SpriteAtlas, //金币图集
- labCoin: cc.Label,
- spIcon: cc.Sprite,
- labCi: cc.Label,
- labBiNum: cc.Label,
- labVip: cc.Label,
- },
- // LIFE-CYCLE CALLBACKS:
- // onLoad () {},
- start () {
- },
- setInfo(exchangeJs, info){
- this.exchangeJs = exchangeJs;
- this.labCoin.string = `${11111}金币`;
- this.spIcon.spriteFrame = this.atlasCoin.getSpriteFrame('coin2');
- // ResMgr.loadTexture('texture/head/h1', (sp)=>{
- // this.spIcon.spriteFrame = sp;
- // // this.spIcon.node.width = 90;
- // // this.spIcon.node.height = 90;
- // });
- this.labCi.string = `今日剩余兑换${2}次`;
- this.labBiNum.string = `x${123}`;
- this.labVip.string = `VIP${3}可兑换`;
- },
- onClickExchange(){
- console.log('aaaaaaaaa');
- },
- });
|