import EventMgr from "../../FrameWork/Event/EventMgr"; import { ryw_Event } from "../../FrameWork/Event/EventEnum"; import Common5 from "../../Platform/th/Common5"; import TaskInfoView from "../JuQingChat/TaskInfoView"; const {ccclass, property} = cc._decorator; @ccclass export default class ExitRoom extends cc.Component { onLoad () { } start () { } onBtnExitRoomClick(){ // Common5.playEffect("sound/按键点击") console.log('onBtnExitRoomClick+++++++++===') this.node.parent.removeFromParent() this.node.parent.destroy() let prefabLayer = cc.director.getScene().getChildByName("Canvas").getChildByName('prefabLayer') if (prefabLayer.getChildByName("taskInfoNode")) { prefabLayer.getChildByName("taskInfoNode").getComponent(TaskInfoView).onClose() } EventMgr.emitEvent_custom(ryw_Event.ExitBtnEvent, ''); } }