@ives_xxz/framework 2.0.1 → 2.0.3
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.
- package/FrameworkAutoInitialize.ts +1 -0
- package/package.json +1 -1
- package/scene/FWScene.ts +4 -6
- package/types/FW.d.ts +7 -4
|
@@ -45,6 +45,7 @@ export function autoInitialize() {
|
|
|
45
45
|
FW.Framework = new (require('./Framework').Framework)();
|
|
46
46
|
FW.FrameworkBase = require('./FrameworkBase').FrameworkBase;
|
|
47
47
|
FW.Entry = new (require('./entry/FWEntry').FWEntry)();
|
|
48
|
+
FW.Scene = require('./scene/FWScene').FWScene;
|
|
48
49
|
FW.Logic = require('./logic/FWLogic').FWLogic;
|
|
49
50
|
FW.Data = require('./data/FWData').FWData;
|
|
50
51
|
FW.Sender = require('./service/socket/FWSocketSender').FWSocketSender;
|
package/package.json
CHANGED
package/scene/FWScene.ts
CHANGED
|
@@ -1,21 +1,19 @@
|
|
|
1
|
-
import { FWSocketAutoProcessResume } from '../expand/FWDecorator';
|
|
2
|
-
|
|
3
1
|
const { ccclass, property } = cc._decorator;
|
|
4
2
|
|
|
5
3
|
@ccclass
|
|
6
|
-
export
|
|
4
|
+
export abstract class FWScene extends cc.Component {
|
|
7
5
|
readonly entry: FW.Entry = FW.Entry;
|
|
8
6
|
|
|
9
7
|
@FWSocketAutoProcessResume()
|
|
10
|
-
|
|
8
|
+
onLoad(): void {
|
|
11
9
|
this.entry.scene = this;
|
|
12
10
|
}
|
|
13
11
|
|
|
14
|
-
|
|
12
|
+
update(dt: number): void {
|
|
15
13
|
this.entry?.update?.(dt);
|
|
16
14
|
}
|
|
17
15
|
|
|
18
|
-
|
|
16
|
+
onDestroy(): void {
|
|
19
17
|
this.entry?.evtMgr.targetOff(this);
|
|
20
18
|
this.entry?.timeMgr.unSchedule(this);
|
|
21
19
|
this.entry?.uiMgr.unRegisterTarget(this);
|
package/types/FW.d.ts
CHANGED
|
@@ -98,10 +98,6 @@ declare namespace FW {
|
|
|
98
98
|
bindVirtualViewComponent(args: FW.VirtualViewComponentArgs);
|
|
99
99
|
};
|
|
100
100
|
|
|
101
|
-
type Scene = {
|
|
102
|
-
node: cc.Node;
|
|
103
|
-
};
|
|
104
|
-
|
|
105
101
|
type ObjectManager = {
|
|
106
102
|
/** 创建一个对象池 */
|
|
107
103
|
createObjectPool<T extends FWObject = FWObject>(
|
|
@@ -2258,6 +2254,13 @@ declare namespace FW {
|
|
|
2258
2254
|
|
|
2259
2255
|
declare namespace FW {
|
|
2260
2256
|
export const SystemConfig;
|
|
2257
|
+
|
|
2258
|
+
export class Scene extends cc.Component {
|
|
2259
|
+
onLoad(): void;
|
|
2260
|
+
update(dt: number);
|
|
2261
|
+
onDestroy(): void;
|
|
2262
|
+
}
|
|
2263
|
+
|
|
2261
2264
|
export class Logic extends FrameworkBase {
|
|
2262
2265
|
public initialize?(): void;
|
|
2263
2266
|
public onDestroy?(): void;
|