import { ryw_Event } from "../../FrameWork/Event/EventEnum"; import EventMgr from "../../FrameWork/Event/EventMgr"; import User from "../../FrameWork/User/User"; import TaskManager, { MainTaskIdEnum } from "../JuQingChat/TaskManager"; import BagManager from "../Manager/BagManager"; import InterfaceManager from "../Manager/InterfaceManager"; import { GameType } from "../PrefabManager/PrefabManage"; const {ccclass, property} = cc._decorator; @ccclass export default class ShangDianRenWuDan extends cc.Component { // @property(cc.Node) // jianTouXia: cc.Node = null; @property(cc.Node) descView: cc.Node = null; @property(cc.Node) itemNode: cc.Node = null; @property(cc.Node) jianTouShang: cc.Node = null; @property(cc.String) curGameName: string = ''; // @property(cc.Node) // jianTouShang: cc.Node = null; // @property(cc.String) // curGameName: string = ''; // LIFE-CYCLE CALLBACKS: // onLoad () {} start () { this.refreshView() EventMgr.onEvent_custom(ryw_Event.RefreshCurJinHuoDesc,()=>{ this.refreshView() },this) } refreshView(){ this.descView.removeAllChildren() let mainTaskInfo:any = TaskManager.getCurUnLockMainTaskInfo() let mainId = mainTaskInfo.Id let taskConfig = TaskManager.getTaskConfigById(mainId) if(taskConfig && taskConfig.taskCaiGouDan && (taskConfig.GMGameType == this.curGameName)){ this.node.active = true for(let i = 0;i=buyNum){ numLab.string = ''+buyNum+'/'+buyNum+'' }else{ numLab.string = ''+haveNum+'/'+buyNum+'' } } }