@ives_xxz/framework 1.4.10 → 1.4.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -33,18 +33,16 @@ export abstract class FWLayerController implements FW.LayerController {
|
|
|
33
33
|
onEnable?();
|
|
34
34
|
onDisable?();
|
|
35
35
|
onDestroy?();
|
|
36
|
-
onClose?();
|
|
36
|
+
async onClose?();
|
|
37
37
|
initialize() {}
|
|
38
38
|
|
|
39
|
-
destroy() {
|
|
39
|
+
async destroy() {
|
|
40
40
|
FW.Entry.timeMgr?.unSchedule(this);
|
|
41
41
|
FW.Entry.evtMgr?.targetOff(this);
|
|
42
42
|
cc.Tween.stopAllByTarget(this.layer?.node);
|
|
43
43
|
this.layer?.node?.stopAllActions();
|
|
44
44
|
this.layer?.unscheduleAllCallbacks();
|
|
45
45
|
this.layer?.node?.destroy();
|
|
46
|
-
this.onClose?.();
|
|
47
|
-
this.onDestroy?.();
|
|
48
46
|
}
|
|
49
47
|
|
|
50
48
|
/**
|
|
@@ -702,9 +702,8 @@ export class FWLayerManager extends FWManager implements FW.LayerManager {
|
|
|
702
702
|
let layerData = ctr.layerData;
|
|
703
703
|
|
|
704
704
|
if (cc.isValid(ctr.layer?.node)) {
|
|
705
|
-
ctr.
|
|
705
|
+
await ctr.onClose?.();
|
|
706
706
|
ctr.destroy?.();
|
|
707
|
-
ctr.onClose?.();
|
|
708
707
|
if (ctr.autoRelease) {
|
|
709
708
|
FW.Entry.resMgr.releaseAsset(ctr.layerData.layerAssetProperty);
|
|
710
709
|
}
|