import { _decorator, Component, Node } from 'cc'; const { ccclass, property } = _decorator; @ccclass('boss_tips') export class boss_tips extends Component { @property(Node) btn_tips:Node = null; private call_back = null; protected start(): void { this.btn_tips.on(Node.EventType.TOUCH_END,()=>{ if(this.call_back!=null){ this.call_back() } }) } public initView(call){ this.call_back = call; } }