import { _decorator, Component, Mask, Node, UITransform, Vec3, Widget } from 'cc'; const { ccclass, property } = _decorator; @ccclass('guid') export class guid extends Component { @property(Node) btn_click:Node; @property(Node) mask:Node; public showGuid(pos:Vec3,call_back,target,size){ this.node.position = pos; this.node.getComponent(UITransform).contentSize = size; this.mask.getComponent(Widget).target = target this.btn_click.on(Node.EventType.TOUCH_END,()=>{ call_back() },this.btn_click) } }