const {ccclass, property, executeInEditMode, playOnFocus} = cc._decorator; @ccclass export class ResRelease extends cc.Component { call: Function = null; protected onDestroy(): void { this.call && this.call(); } }