// Learn TypeScript: // - https://docs.cocos.com/creator/manual/en/scripting/typescript.html // Learn Attribute: // - https://docs.cocos.com/creator/manual/en/scripting/reference/attributes.html // Learn life-cycle callbacks: // - https://docs.cocos.com/creator/manual/en/scripting/life-cycle-callbacks.html import { EventCenter } from "../../common/ui/uiEv/EventCenter"; import UIBaseEv from "../../common/ui/uiEv/UIBaseEv"; import { MSG_Event } from "../DefineMsg/LogicMsg"; import { composeObj } from "../Model/data/baseObject"; const {ccclass, property} = cc._decorator; @ccclass export default class venueListModule extends UIBaseEv { @property(cc.Button) venueBtn:cc.Button = null; venueData:composeObj = null; fashTypeIdx = 0; onShow(objData:composeObj,idx) { this.venueData = objData; this.fashTypeIdx = idx; this.updateUI(); let aaa; } updateUI() { this.venueBtn.getComponentInChildren(cc.Label).string = this.venueData.getName(); } // onLoad () {} onClickEvent(event,customEventData) { switch (+customEventData) { case 0: EventCenter.emit(MSG_Event.FishBookNotice,this.fashTypeIdx); break; default: break; } } start () { } // update (dt) {} }