@shimotsuki/core 2.0.37 → 2.0.38
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/dist/index.d.ts +1 -0
- package/dist/index.js +3 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -785,6 +785,7 @@ declare class SocialGameClientManager extends BaseManager {
|
|
|
785
785
|
private isInBackground;
|
|
786
786
|
readonly onEventHideDelegate: AsyncDelegate<() => (Promise<void> | void)>;
|
|
787
787
|
readonly onEventShowDelegate: AsyncDelegate<() => (Promise<void> | void)>;
|
|
788
|
+
readonly onEventReloadSceneDelegate: AsyncDelegate<() => (Promise<void> | void)>;
|
|
788
789
|
get activeClients(): WrapperSocialGameClient[];
|
|
789
790
|
constructor(cat: Manager);
|
|
790
791
|
/**
|
package/dist/index.js
CHANGED
|
@@ -2350,6 +2350,7 @@ class SocialGameClientManager extends BaseManager {
|
|
|
2350
2350
|
isInBackground = false;
|
|
2351
2351
|
onEventHideDelegate = new AsyncDelegate();
|
|
2352
2352
|
onEventShowDelegate = new AsyncDelegate();
|
|
2353
|
+
onEventReloadSceneDelegate = new AsyncDelegate();
|
|
2353
2354
|
get activeClients() {
|
|
2354
2355
|
return Array.from(this.managedClients)
|
|
2355
2356
|
.map(([_, client]) => client)
|
|
@@ -2477,9 +2478,10 @@ class SocialGameClientManager extends BaseManager {
|
|
|
2477
2478
|
});
|
|
2478
2479
|
}
|
|
2479
2480
|
// 单个WS重连成功回调
|
|
2480
|
-
handleSingleReconnect = () => {
|
|
2481
|
+
handleSingleReconnect = async () => {
|
|
2481
2482
|
if (this.activeClients.every(client => client.socketConnectStatus === SocketConnectStatus.CONNECTED)) {
|
|
2482
2483
|
log('单个WS重连成功回调===', this.managedClients);
|
|
2484
|
+
await this.onEventReloadSceneDelegate.dispatch();
|
|
2483
2485
|
cat.gui.hideLoading().reloadScene();
|
|
2484
2486
|
}
|
|
2485
2487
|
};
|