@shimotsuki/core 3.0.28 → 3.0.30
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/shimotsuki_core.js +138 -131
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -684,6 +684,7 @@ declare class SocialGameClientManager extends BaseManager {
|
|
|
684
684
|
private initGlobalListeners;
|
|
685
685
|
private handleGlobalStateChange;
|
|
686
686
|
private safeTriggerReconnectAll;
|
|
687
|
+
private dispatchReloadAndShow;
|
|
687
688
|
private triggerReconnectAll;
|
|
688
689
|
private disconnectAll;
|
|
689
690
|
private handleSingleClose;
|
package/dist/shimotsuki_core.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import e from "@babel/runtime-corejs3/core-js/global-this";
|
|
2
2
|
|
|
3
|
-
import { AudioSource as t, _decorator as i, AudioClip as n, error as o, Node as s, director as r, log as a, Component as l, Prefab as c, instantiate as h, isValid as u, Layers as d, view as p, Widget as f, v3 as m, tween as g, Enum as
|
|
3
|
+
import { AudioSource as t, _decorator as i, AudioClip as n, error as o, Node as s, director as r, log as a, Component as l, Prefab as c, instantiate as h, isValid as u, Layers as d, view as p, Widget as f, v3 as m, tween as g, Enum as y, game as _, Label as b, UIOpacity as v, Tween as C, BlockInputEvents as E, Button as S, assetManager as w, Director as O, warn as A, AsyncDelegate as T, Game as I, Asset as k, resources as R, sys as M, SpriteFrame as U, Sprite as N } from "cc";
|
|
4
4
|
|
|
5
5
|
import D from "@babel/runtime-corejs3/core-js-stable/reflect/get";
|
|
6
6
|
|
|
@@ -10,9 +10,9 @@ import j from "@babel/runtime-corejs3/core-js-stable/object/assign";
|
|
|
10
10
|
|
|
11
11
|
import x from "@babel/runtime-corejs3/core-js-stable/promise";
|
|
12
12
|
|
|
13
|
-
import
|
|
13
|
+
import B from "eventemitter3";
|
|
14
14
|
|
|
15
|
-
import
|
|
15
|
+
import F from "@babel/runtime-corejs3/core-js-stable/instance/includes";
|
|
16
16
|
|
|
17
17
|
import P from "@babel/runtime-corejs3/core-js-stable/json/stringify";
|
|
18
18
|
|
|
@@ -227,7 +227,7 @@ class AudioManager extends BaseManager {
|
|
|
227
227
|
}
|
|
228
228
|
resumeMusic() {
|
|
229
229
|
var e;
|
|
230
|
-
if (
|
|
230
|
+
if (F(e = [ 0, 2 ]).call(e, this.music.state)) this.music?.play();
|
|
231
231
|
}
|
|
232
232
|
get progressMusic() {
|
|
233
233
|
return this.music.progress;
|
|
@@ -334,13 +334,13 @@ class AudioManager extends BaseManager {
|
|
|
334
334
|
}
|
|
335
335
|
}
|
|
336
336
|
|
|
337
|
-
function
|
|
337
|
+
function ye(e, t, i, n) {
|
|
338
338
|
var o = arguments.length, s = o < 3 ? t : n === null ? n = Object.getOwnPropertyDescriptor(t, i) : n, r;
|
|
339
339
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") s = Reflect.decorate(e, t, i, n); else for (var a = e.length - 1; a >= 0; a--) if (r = e[a]) s = (o < 3 ? r(s) : o > 3 ? r(t, i, s) : r(t, i)) || s;
|
|
340
340
|
return o > 3 && s && Object.defineProperty(t, i, s), s;
|
|
341
341
|
}
|
|
342
342
|
|
|
343
|
-
function
|
|
343
|
+
function _e(e, t) {
|
|
344
344
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(e, t);
|
|
345
345
|
}
|
|
346
346
|
|
|
@@ -388,7 +388,7 @@ class BaseComponent extends l {
|
|
|
388
388
|
}
|
|
389
389
|
addAudoListener(e) {
|
|
390
390
|
var t;
|
|
391
|
-
if (!
|
|
391
|
+
if (!F(t = this.eventEmitter).call(t, e) && e !== this.cat.event) {
|
|
392
392
|
this.eventEmitter.push(e);
|
|
393
393
|
}
|
|
394
394
|
return e;
|
|
@@ -670,7 +670,7 @@ class AudioSourceBaseComponent extends BaseComponent {
|
|
|
670
670
|
}
|
|
671
671
|
playAudio() {
|
|
672
672
|
const {switchEffect: e, switchMusic: t} = this.cat.audio;
|
|
673
|
-
if (!this.audioSource.playing && (this.type === Se.BGM ? t : e) && !
|
|
673
|
+
if (!this.audioSource.playing && (this.type === Se.BGM ? t : e) && !_._paused) this.audioSource.play();
|
|
674
674
|
}
|
|
675
675
|
onPlayEffectHandler() {}
|
|
676
676
|
onStopEffectHandler() {
|
|
@@ -686,27 +686,27 @@ class AudioSourceBaseComponent extends BaseComponent {
|
|
|
686
686
|
}
|
|
687
687
|
}
|
|
688
688
|
|
|
689
|
-
|
|
689
|
+
ye([ Ee({
|
|
690
690
|
tooltip: `类型:\n EFFECT 音效\n BGM 音乐`,
|
|
691
|
-
type:
|
|
692
|
-
}),
|
|
691
|
+
type: y(Se)
|
|
692
|
+
}), _e("design:type", Number) ], AudioSourceBaseComponent.prototype, "type", void 0);
|
|
693
693
|
|
|
694
|
-
|
|
694
|
+
ye([ Ee({
|
|
695
695
|
tooltip: "音源",
|
|
696
696
|
type: n
|
|
697
|
-
}),
|
|
697
|
+
}), _e("design:type", typeof (ve = typeof n !== "undefined" && n) === "function" ? ve : Object) ], AudioSourceBaseComponent.prototype, "clip", void 0);
|
|
698
698
|
|
|
699
|
-
|
|
699
|
+
ye([ Ee({
|
|
700
700
|
tooltip: "循环"
|
|
701
|
-
}),
|
|
701
|
+
}), _e("design:type", Boolean) ], AudioSourceBaseComponent.prototype, "loop", void 0);
|
|
702
702
|
|
|
703
|
-
|
|
703
|
+
ye([ Ee({
|
|
704
704
|
tooltip: "音量"
|
|
705
|
-
}),
|
|
705
|
+
}), _e("design:type", Number) ], AudioSourceBaseComponent.prototype, "volume", void 0);
|
|
706
706
|
|
|
707
|
-
|
|
707
|
+
ye([ Ee({
|
|
708
708
|
tooltip: "是否启用自动播放"
|
|
709
|
-
}),
|
|
709
|
+
}), _e("design:type", Boolean) ], AudioSourceBaseComponent.prototype, "playOnAwake", void 0);
|
|
710
710
|
|
|
711
711
|
var we;
|
|
712
712
|
|
|
@@ -737,7 +737,7 @@ class AudioSourceUILayer extends UILayer {
|
|
|
737
737
|
}
|
|
738
738
|
playAudio() {
|
|
739
739
|
const {switchEffect: e, switchMusic: t} = this.cat.audio;
|
|
740
|
-
if (!this.audioSource.playing && (this.type === Se.BGM ? t : e) && !
|
|
740
|
+
if (!this.audioSource.playing && (this.type === Se.BGM ? t : e) && !_._paused) this.audioSource.play();
|
|
741
741
|
}
|
|
742
742
|
onPlayEffectHandler() {}
|
|
743
743
|
onStopEffectHandler() {
|
|
@@ -753,31 +753,31 @@ class AudioSourceUILayer extends UILayer {
|
|
|
753
753
|
}
|
|
754
754
|
}
|
|
755
755
|
|
|
756
|
-
|
|
756
|
+
ye([ Ae({
|
|
757
757
|
tooltip: `类型:\n EFFECT 音效\n BGM 音乐`,
|
|
758
|
-
type:
|
|
759
|
-
}),
|
|
758
|
+
type: y(Se)
|
|
759
|
+
}), _e("design:type", Number) ], AudioSourceUILayer.prototype, "type", void 0);
|
|
760
760
|
|
|
761
|
-
|
|
761
|
+
ye([ Ae({
|
|
762
762
|
tooltip: "音源",
|
|
763
763
|
type: n
|
|
764
|
-
}),
|
|
764
|
+
}), _e("design:type", typeof (we = typeof n !== "undefined" && n) === "function" ? we : Object) ], AudioSourceUILayer.prototype, "clip", void 0);
|
|
765
765
|
|
|
766
|
-
|
|
766
|
+
ye([ Ae({
|
|
767
767
|
tooltip: "循环"
|
|
768
|
-
}),
|
|
768
|
+
}), _e("design:type", Boolean) ], AudioSourceUILayer.prototype, "loop", void 0);
|
|
769
769
|
|
|
770
|
-
|
|
770
|
+
ye([ Ae({
|
|
771
771
|
tooltip: "音量"
|
|
772
|
-
}),
|
|
772
|
+
}), _e("design:type", Number) ], AudioSourceUILayer.prototype, "volume", void 0);
|
|
773
773
|
|
|
774
|
-
|
|
774
|
+
ye([ Ae({
|
|
775
775
|
tooltip: "是否启用自动播放"
|
|
776
|
-
}),
|
|
776
|
+
}), _e("design:type", Boolean) ], AudioSourceUILayer.prototype, "playOnAwake", void 0);
|
|
777
777
|
|
|
778
|
-
var Te, Ie, ke,
|
|
778
|
+
var Te, Ie, ke, Re;
|
|
779
779
|
|
|
780
|
-
const {ccclass:
|
|
780
|
+
const {ccclass: Me, property: Ue, menu: Ne} = i;
|
|
781
781
|
|
|
782
782
|
var De;
|
|
783
783
|
|
|
@@ -841,27 +841,27 @@ let Le = class CoreToast extends BaseComponent {
|
|
|
841
841
|
}
|
|
842
842
|
};
|
|
843
843
|
|
|
844
|
-
|
|
844
|
+
ye([ Ue({
|
|
845
845
|
type: s,
|
|
846
846
|
tooltip: "固定节点"
|
|
847
|
-
}),
|
|
847
|
+
}), _e("design:type", typeof (Te = typeof s !== "undefined" && s) === "function" ? Te : Object) ], Le.prototype, "fixed_node", void 0);
|
|
848
848
|
|
|
849
|
-
|
|
849
|
+
ye([ Ue({
|
|
850
850
|
type: s,
|
|
851
851
|
tooltip: "滑动节点"
|
|
852
|
-
}),
|
|
852
|
+
}), _e("design:type", typeof (Ie = typeof s !== "undefined" && s) === "function" ? Ie : Object) ], Le.prototype, "slide_node", void 0);
|
|
853
853
|
|
|
854
|
-
|
|
854
|
+
ye([ Ue({
|
|
855
855
|
type: b,
|
|
856
856
|
tooltip: "固定标签节点"
|
|
857
|
-
}),
|
|
857
|
+
}), _e("design:type", typeof (ke = typeof b !== "undefined" && b) === "function" ? ke : Object) ], Le.prototype, "fixed_label", void 0);
|
|
858
858
|
|
|
859
|
-
|
|
859
|
+
ye([ Ue({
|
|
860
860
|
type: b,
|
|
861
861
|
tooltip: "滑动标签节点"
|
|
862
|
-
}),
|
|
862
|
+
}), _e("design:type", typeof (Re = typeof b !== "undefined" && b) === "function" ? Re : Object) ], Le.prototype, "slide_label", void 0);
|
|
863
863
|
|
|
864
|
-
Le =
|
|
864
|
+
Le = ye([ Me("CoreToast"), Ne("CATCORE/CoreToast") ], Le);
|
|
865
865
|
|
|
866
866
|
var je;
|
|
867
867
|
|
|
@@ -878,18 +878,18 @@ var je;
|
|
|
878
878
|
|
|
879
879
|
var xe;
|
|
880
880
|
|
|
881
|
-
const {ccclass:
|
|
881
|
+
const {ccclass: Be, property: Fe, menu: Pe} = i;
|
|
882
882
|
|
|
883
883
|
let Ge = class CoreBlackMask extends BaseComponent {
|
|
884
884
|
tween;
|
|
885
885
|
};
|
|
886
886
|
|
|
887
|
-
|
|
887
|
+
ye([ Fe({
|
|
888
888
|
type: s,
|
|
889
889
|
tooltip: "动画节点"
|
|
890
|
-
}),
|
|
890
|
+
}), _e("design:type", typeof (xe = typeof s !== "undefined" && s) === "function" ? xe : Object) ], Ge.prototype, "tween", void 0);
|
|
891
891
|
|
|
892
|
-
Ge =
|
|
892
|
+
Ge = ye([ Be("CoreBlackMask"), Pe("CATCORE/CoreBlackMask") ], Ge);
|
|
893
893
|
|
|
894
894
|
var He, $e;
|
|
895
895
|
|
|
@@ -951,15 +951,15 @@ let ze = class CoreUIContainer extends UILayer {
|
|
|
951
951
|
}
|
|
952
952
|
};
|
|
953
953
|
|
|
954
|
-
|
|
954
|
+
ye([ We({
|
|
955
955
|
type: s
|
|
956
|
-
}),
|
|
956
|
+
}), _e("design:type", typeof (He = typeof s !== "undefined" && s) === "function" ? He : Object) ], ze.prototype, "scene_mask_node", void 0);
|
|
957
957
|
|
|
958
|
-
|
|
958
|
+
ye([ We({
|
|
959
959
|
type: s
|
|
960
|
-
}),
|
|
960
|
+
}), _e("design:type", typeof ($e = typeof s !== "undefined" && s) === "function" ? $e : Object) ], ze.prototype, "ui_container", void 0);
|
|
961
961
|
|
|
962
|
-
ze =
|
|
962
|
+
ze = ye([ Ke("CoreUIContainer"), Ve("CATCORE/CoreUIContainer") ], ze);
|
|
963
963
|
|
|
964
964
|
class RootUILayer extends UILayer {
|
|
965
965
|
onEnable() {
|
|
@@ -1002,17 +1002,17 @@ let Ye = class CoreShowLoading extends RootUILayer {
|
|
|
1002
1002
|
}
|
|
1003
1003
|
};
|
|
1004
1004
|
|
|
1005
|
-
|
|
1005
|
+
ye([ Xe({
|
|
1006
1006
|
type: b,
|
|
1007
1007
|
tooltip: "标题"
|
|
1008
|
-
}),
|
|
1008
|
+
}), _e("design:type", typeof (qe = typeof b !== "undefined" && b) === "function" ? qe : Object) ], Ye.prototype, "title", void 0);
|
|
1009
1009
|
|
|
1010
|
-
|
|
1010
|
+
ye([ Xe({
|
|
1011
1011
|
type: s,
|
|
1012
1012
|
tooltip: "动画"
|
|
1013
|
-
}),
|
|
1013
|
+
}), _e("design:type", typeof (Qe = typeof s !== "undefined" && s) === "function" ? Qe : Object) ], Ye.prototype, "loadingTween", void 0);
|
|
1014
1014
|
|
|
1015
|
-
Ye =
|
|
1015
|
+
Ye = ye([ Je("CoreShowLoading"), Ze("CATCORE/CoreShowLoading") ], Ye);
|
|
1016
1016
|
|
|
1017
1017
|
var et;
|
|
1018
1018
|
|
|
@@ -1074,22 +1074,22 @@ let at = class CoreReconnection extends RootUILayer {
|
|
|
1074
1074
|
}
|
|
1075
1075
|
};
|
|
1076
1076
|
|
|
1077
|
-
|
|
1077
|
+
ye([ st({
|
|
1078
1078
|
type: b,
|
|
1079
1079
|
tooltip: "通用提示文本"
|
|
1080
|
-
}),
|
|
1080
|
+
}), _e("design:type", typeof (tt = typeof b !== "undefined" && b) === "function" ? tt : Object) ], at.prototype, "common_prompt_text", void 0);
|
|
1081
1081
|
|
|
1082
|
-
|
|
1082
|
+
ye([ st({
|
|
1083
1083
|
type: S,
|
|
1084
1084
|
tooltip: "确定按钮"
|
|
1085
|
-
}),
|
|
1085
|
+
}), _e("design:type", typeof (it = typeof S !== "undefined" && S) === "function" ? it : Object) ], at.prototype, "btn_confirm", void 0);
|
|
1086
1086
|
|
|
1087
|
-
|
|
1087
|
+
ye([ st({
|
|
1088
1088
|
type: S,
|
|
1089
1089
|
tooltip: "关闭按钮"
|
|
1090
|
-
}),
|
|
1090
|
+
}), _e("design:type", typeof (nt = typeof S !== "undefined" && S) === "function" ? nt : Object) ], at.prototype, "btn_close", void 0);
|
|
1091
1091
|
|
|
1092
|
-
at =
|
|
1092
|
+
at = ye([ ot("CoreReconnection"), rt("CATCORE/CoreReconnection") ], at);
|
|
1093
1093
|
|
|
1094
1094
|
var lt, ct, ht;
|
|
1095
1095
|
|
|
@@ -1114,28 +1114,28 @@ let ft = class CoreNotice extends RootUILayer {
|
|
|
1114
1114
|
}
|
|
1115
1115
|
};
|
|
1116
1116
|
|
|
1117
|
-
|
|
1117
|
+
ye([ dt({
|
|
1118
1118
|
type: b,
|
|
1119
1119
|
tooltip: "提示文本"
|
|
1120
|
-
}),
|
|
1120
|
+
}), _e("design:type", typeof (lt = typeof b !== "undefined" && b) === "function" ? lt : Object) ], ft.prototype, "text", void 0);
|
|
1121
1121
|
|
|
1122
|
-
|
|
1122
|
+
ye([ dt({
|
|
1123
1123
|
type: S,
|
|
1124
1124
|
tooltip: "确定按钮"
|
|
1125
|
-
}),
|
|
1125
|
+
}), _e("design:type", typeof (ct = typeof S !== "undefined" && S) === "function" ? ct : Object) ], ft.prototype, "btn_confirm", void 0);
|
|
1126
1126
|
|
|
1127
|
-
|
|
1127
|
+
ye([ dt({
|
|
1128
1128
|
type: S,
|
|
1129
1129
|
tooltip: "关闭按钮"
|
|
1130
|
-
}),
|
|
1130
|
+
}), _e("design:type", typeof (ht = typeof S !== "undefined" && S) === "function" ? ht : Object) ], ft.prototype, "btn_close", void 0);
|
|
1131
1131
|
|
|
1132
|
-
ft =
|
|
1132
|
+
ft = ye([ ut("CoreNotice"), pt("CATCORE/CoreNotice") ], ft);
|
|
1133
1133
|
|
|
1134
1134
|
class SceneLayer extends BaseComponent {
|
|
1135
1135
|
isReload;
|
|
1136
1136
|
}
|
|
1137
1137
|
|
|
1138
|
-
var mt, gt,
|
|
1138
|
+
var mt, gt, yt, _t, bt, vt, Ct, Et;
|
|
1139
1139
|
|
|
1140
1140
|
const {ccclass: St, property: wt, menu: Ot} = i;
|
|
1141
1141
|
|
|
@@ -1437,47 +1437,47 @@ let Tt = class Gui extends BaseComponent {
|
|
|
1437
1437
|
}
|
|
1438
1438
|
};
|
|
1439
1439
|
|
|
1440
|
-
|
|
1440
|
+
ye([ wt({
|
|
1441
1441
|
type: c,
|
|
1442
1442
|
tooltip: "断线重连UI预制体"
|
|
1443
|
-
}),
|
|
1443
|
+
}), _e("design:type", typeof (mt = typeof c !== "undefined" && c) === "function" ? mt : Object) ], Tt.prototype, "reconnection_ui_prefab", void 0);
|
|
1444
1444
|
|
|
1445
|
-
|
|
1445
|
+
ye([ wt({
|
|
1446
1446
|
type: c,
|
|
1447
1447
|
tooltip: "提示UI预制体"
|
|
1448
|
-
}),
|
|
1448
|
+
}), _e("design:type", typeof (gt = typeof c !== "undefined" && c) === "function" ? gt : Object) ], Tt.prototype, "toast_ui_prefab", void 0);
|
|
1449
1449
|
|
|
1450
|
-
|
|
1450
|
+
ye([ wt({
|
|
1451
1451
|
type: c,
|
|
1452
1452
|
tooltip: "加载UI预制体"
|
|
1453
|
-
}),
|
|
1453
|
+
}), _e("design:type", typeof (yt = typeof c !== "undefined" && c) === "function" ? yt : Object) ], Tt.prototype, "loading_ui_prefab", void 0);
|
|
1454
1454
|
|
|
1455
|
-
|
|
1455
|
+
ye([ wt({
|
|
1456
1456
|
type: c,
|
|
1457
1457
|
tooltip: "公告UI预制体"
|
|
1458
|
-
}),
|
|
1458
|
+
}), _e("design:type", typeof (_t = typeof c !== "undefined" && c) === "function" ? _t : Object) ], Tt.prototype, "notice_ui_prefab", void 0);
|
|
1459
1459
|
|
|
1460
|
-
|
|
1460
|
+
ye([ wt({
|
|
1461
1461
|
type: c,
|
|
1462
1462
|
tooltip: "UI层预制体"
|
|
1463
|
-
}),
|
|
1463
|
+
}), _e("design:type", typeof (bt = typeof c !== "undefined" && c) === "function" ? bt : Object) ], Tt.prototype, "ui_prefab", void 0);
|
|
1464
1464
|
|
|
1465
|
-
|
|
1465
|
+
ye([ wt({
|
|
1466
1466
|
type: s,
|
|
1467
1467
|
tooltip: "root-UI层"
|
|
1468
|
-
}),
|
|
1468
|
+
}), _e("design:type", typeof (vt = typeof s !== "undefined" && s) === "function" ? vt : Object) ], Tt.prototype, "root_ui", void 0);
|
|
1469
1469
|
|
|
1470
|
-
|
|
1470
|
+
ye([ wt({
|
|
1471
1471
|
type: s,
|
|
1472
1472
|
tooltip: "root-组件层"
|
|
1473
|
-
}),
|
|
1473
|
+
}), _e("design:type", typeof (Ct = typeof s !== "undefined" && s) === "function" ? Ct : Object) ], Tt.prototype, "root_toast", void 0);
|
|
1474
1474
|
|
|
1475
|
-
|
|
1475
|
+
ye([ wt({
|
|
1476
1476
|
type: s,
|
|
1477
1477
|
tooltip: "root-mask"
|
|
1478
|
-
}),
|
|
1478
|
+
}), _e("design:type", typeof (Et = typeof s !== "undefined" && s) === "function" ? Et : Object) ], Tt.prototype, "root_mask", void 0);
|
|
1479
1479
|
|
|
1480
|
-
Tt =
|
|
1480
|
+
Tt = ye([ St("Gui"), Ot("CATCORE/Gui") ], Tt);
|
|
1481
1481
|
|
|
1482
1482
|
var It;
|
|
1483
1483
|
|
|
@@ -1518,7 +1518,7 @@ class WrapperSocialGameClient extends re {
|
|
|
1518
1518
|
logBlackList=[];
|
|
1519
1519
|
ignore=e => {
|
|
1520
1520
|
var t;
|
|
1521
|
-
return
|
|
1521
|
+
return F(t = this.logBlackList).call(t, e);
|
|
1522
1522
|
};
|
|
1523
1523
|
constructor(e, t, i, n) {
|
|
1524
1524
|
super(t, i, n, e);
|
|
@@ -1633,8 +1633,8 @@ class SocialGameClientManager extends BaseManager {
|
|
|
1633
1633
|
this.handleGlobalStateChange("hide", e);
|
|
1634
1634
|
});
|
|
1635
1635
|
} else {
|
|
1636
|
-
|
|
1637
|
-
|
|
1636
|
+
_.on(I.EVENT_SHOW, () => this.handleGlobalStateChange("show"));
|
|
1637
|
+
_.on(I.EVENT_HIDE, () => this.handleGlobalStateChange("hide"));
|
|
1638
1638
|
}
|
|
1639
1639
|
}
|
|
1640
1640
|
async handleGlobalStateChange(e, t) {
|
|
@@ -1672,26 +1672,33 @@ class SocialGameClientManager extends BaseManager {
|
|
|
1672
1672
|
}
|
|
1673
1673
|
async safeTriggerReconnectAll() {
|
|
1674
1674
|
const e = ee();
|
|
1675
|
+
if (this.reconnecting || !this.isGlobalOnline || this.isInBackground || this.managedClients.size === 0) {
|
|
1676
|
+
console.log("[safeTriggerReconnectAll] 没有需要重连的客户端,直接 dispatch");
|
|
1677
|
+
await this.dispatchReloadAndShow();
|
|
1678
|
+
return;
|
|
1679
|
+
}
|
|
1675
1680
|
if (this.reconnecting) {
|
|
1676
|
-
|
|
1681
|
+
console.log("[safeTriggerReconnectAll] 正在重连中,跳过本次");
|
|
1677
1682
|
return;
|
|
1678
1683
|
}
|
|
1679
1684
|
if (e - this.lastReconnectTime < this.RECONNECT_COOLDOWN) {
|
|
1680
|
-
|
|
1685
|
+
console.log("[safeTriggerReconnectAll] 距上次重连过近,跳过本次");
|
|
1681
1686
|
return;
|
|
1682
1687
|
}
|
|
1683
1688
|
this.lastReconnectTime = e;
|
|
1684
1689
|
await this.triggerReconnectAll();
|
|
1685
1690
|
}
|
|
1691
|
+
async dispatchReloadAndShow() {
|
|
1692
|
+
await this.onEventReloadSceneDelegate.dispatch();
|
|
1693
|
+
while (this.pendingShowOptions.length > 0) {
|
|
1694
|
+
const e = this.pendingShowOptions.shift();
|
|
1695
|
+
this.onEventShowDelegate.dispatch(e);
|
|
1696
|
+
}
|
|
1697
|
+
}
|
|
1686
1698
|
async triggerReconnectAll() {
|
|
1687
1699
|
console.log("触发所有客户端重连[正在重连][在线][后台][ws数量]", this.reconnecting, this.isGlobalOnline, this.isInBackground, this.managedClients.size);
|
|
1688
1700
|
if (this.reconnecting || !this.isGlobalOnline || this.isInBackground || this.managedClients.size === 0) {
|
|
1689
|
-
this.
|
|
1690
|
-
console.log("====pendingShowOptions", this.pendingShowOptions.length);
|
|
1691
|
-
while (this.pendingShowOptions.length > 0) {
|
|
1692
|
-
const e = this.pendingShowOptions.shift();
|
|
1693
|
-
this.onEventShowDelegate.dispatch(e);
|
|
1694
|
-
}
|
|
1701
|
+
await this.dispatchReloadAndShow();
|
|
1695
1702
|
return;
|
|
1696
1703
|
}
|
|
1697
1704
|
this.reconnecting = true;
|
|
@@ -1796,7 +1803,7 @@ class ResLoader {
|
|
|
1796
1803
|
i = o.shift();
|
|
1797
1804
|
}
|
|
1798
1805
|
const a = o.shift();
|
|
1799
|
-
let l =
|
|
1806
|
+
let l = R;
|
|
1800
1807
|
if (e && e != "resources") {
|
|
1801
1808
|
if (!w.bundles.has(e)) {
|
|
1802
1809
|
await this.loadBundle(e);
|
|
@@ -1833,7 +1840,7 @@ class ResLoader {
|
|
|
1833
1840
|
i = s.shift();
|
|
1834
1841
|
}
|
|
1835
1842
|
n = s.shift();
|
|
1836
|
-
let l =
|
|
1843
|
+
let l = R;
|
|
1837
1844
|
if (e && e != "resources") {
|
|
1838
1845
|
if (!w.bundles.has(e)) {
|
|
1839
1846
|
await this.loadBundle(e);
|
|
@@ -1961,9 +1968,9 @@ class CoreStore extends BaseManager {}
|
|
|
1961
1968
|
|
|
1962
1969
|
let kt = null;
|
|
1963
1970
|
|
|
1964
|
-
const
|
|
1971
|
+
const Rt = e => ae.MD5(e).toString();
|
|
1965
1972
|
|
|
1966
|
-
const
|
|
1973
|
+
const Mt = (e, t) => {
|
|
1967
1974
|
kt = ae.enc.Hex.parse(t);
|
|
1968
1975
|
};
|
|
1969
1976
|
|
|
@@ -2013,8 +2020,8 @@ var Lt = Object.freeze({
|
|
|
2013
2020
|
JsonFormatter: Dt,
|
|
2014
2021
|
aesDecrypt: Nt,
|
|
2015
2022
|
aesEncrypt: Ut,
|
|
2016
|
-
initCrypto:
|
|
2017
|
-
md5:
|
|
2023
|
+
initCrypto: Mt,
|
|
2024
|
+
md5: Rt
|
|
2018
2025
|
});
|
|
2019
2026
|
|
|
2020
2027
|
class CoreUtil extends BaseManager {
|
|
@@ -2064,7 +2071,7 @@ class StorageManager extends BaseManager {
|
|
|
2064
2071
|
if (!se && null != this._key && null != this._iv) {
|
|
2065
2072
|
t = this.cat.util.encryptUtil.aesEncrypt(`${t}`, this._key, this._iv);
|
|
2066
2073
|
}
|
|
2067
|
-
|
|
2074
|
+
M.localStorage.setItem(e, t);
|
|
2068
2075
|
}
|
|
2069
2076
|
get(e, t) {
|
|
2070
2077
|
if (null == e) {
|
|
@@ -2075,7 +2082,7 @@ class StorageManager extends BaseManager {
|
|
|
2075
2082
|
if (!se) {
|
|
2076
2083
|
e = this.cat.util.encryptUtil.md5(e);
|
|
2077
2084
|
}
|
|
2078
|
-
let i =
|
|
2085
|
+
let i = M.localStorage.getItem(e);
|
|
2079
2086
|
if (null != i && "" !== i && !se && null != this._key && null != this._iv) {
|
|
2080
2087
|
i = this.cat.util.encryptUtil.aesDecrypt(i, this._key, this._iv);
|
|
2081
2088
|
}
|
|
@@ -2106,10 +2113,10 @@ class StorageManager extends BaseManager {
|
|
|
2106
2113
|
if (!se) {
|
|
2107
2114
|
e = this.cat.util.encryptUtil.md5(e);
|
|
2108
2115
|
}
|
|
2109
|
-
|
|
2116
|
+
M.localStorage.removeItem(e);
|
|
2110
2117
|
}
|
|
2111
2118
|
clear() {
|
|
2112
|
-
|
|
2119
|
+
M.localStorage.clear();
|
|
2113
2120
|
}
|
|
2114
2121
|
}
|
|
2115
2122
|
|
|
@@ -2187,7 +2194,7 @@ class Manager {
|
|
|
2187
2194
|
this.#a = new ResLoader;
|
|
2188
2195
|
this.#l = new CoreUtil(this);
|
|
2189
2196
|
this.#r = new StorageManager(this);
|
|
2190
|
-
this.#o = new
|
|
2197
|
+
this.#o = new B;
|
|
2191
2198
|
this.#n = new AudioManager(this);
|
|
2192
2199
|
this.#c = new SocialGameClientManager(this);
|
|
2193
2200
|
this.#s = (await new GuiManager(this).init()).gui;
|
|
@@ -2220,7 +2227,7 @@ class Manager {
|
|
|
2220
2227
|
}
|
|
2221
2228
|
}
|
|
2222
2229
|
|
|
2223
|
-
var jt, xt,
|
|
2230
|
+
var jt, xt, Bt, Ft, Pt, Gt, Ht, $t, Kt;
|
|
2224
2231
|
|
|
2225
2232
|
const {ccclass: Wt, property: Vt, menu: zt} = i;
|
|
2226
2233
|
|
|
@@ -2291,52 +2298,52 @@ let qt = class CoreUIModal extends UILayer {
|
|
|
2291
2298
|
}
|
|
2292
2299
|
};
|
|
2293
2300
|
|
|
2294
|
-
|
|
2301
|
+
ye([ Vt({
|
|
2295
2302
|
type: U,
|
|
2296
2303
|
tooltip: "默认标题"
|
|
2297
|
-
}),
|
|
2304
|
+
}), _e("design:type", typeof (jt = typeof U !== "undefined" && U) === "function" ? jt : Object) ], qt.prototype, "default_title", void 0);
|
|
2298
2305
|
|
|
2299
|
-
|
|
2306
|
+
ye([ Vt({
|
|
2300
2307
|
type: N,
|
|
2301
2308
|
tooltip: "标题节点"
|
|
2302
|
-
}),
|
|
2309
|
+
}), _e("design:type", typeof (xt = typeof N !== "undefined" && N) === "function" ? xt : Object) ], qt.prototype, "title", void 0);
|
|
2303
2310
|
|
|
2304
|
-
|
|
2311
|
+
ye([ Vt({
|
|
2305
2312
|
type: b,
|
|
2306
2313
|
tooltip: "字符串内容按钮"
|
|
2307
|
-
}),
|
|
2314
|
+
}), _e("design:type", typeof (Bt = typeof b !== "undefined" && b) === "function" ? Bt : Object) ], qt.prototype, "prompt_content_str", void 0);
|
|
2308
2315
|
|
|
2309
|
-
|
|
2316
|
+
ye([ Vt({
|
|
2310
2317
|
type: N,
|
|
2311
2318
|
tooltip: "图片精灵内容按钮"
|
|
2312
|
-
}),
|
|
2319
|
+
}), _e("design:type", typeof (Ft = typeof N !== "undefined" && N) === "function" ? Ft : Object) ], qt.prototype, "prompt_content_spriteFrame", void 0);
|
|
2313
2320
|
|
|
2314
|
-
|
|
2321
|
+
ye([ Vt({
|
|
2315
2322
|
type: S,
|
|
2316
2323
|
tooltip: "确认按钮"
|
|
2317
|
-
}),
|
|
2324
|
+
}), _e("design:type", typeof (Pt = typeof S !== "undefined" && S) === "function" ? Pt : Object) ], qt.prototype, "btn_confirm", void 0);
|
|
2318
2325
|
|
|
2319
|
-
|
|
2326
|
+
ye([ Vt({
|
|
2320
2327
|
type: U,
|
|
2321
2328
|
tooltip: "确认按钮精灵图"
|
|
2322
|
-
}),
|
|
2329
|
+
}), _e("design:type", typeof (Gt = typeof U !== "undefined" && U) === "function" ? Gt : Object) ], qt.prototype, "confirm_spriteFrame", void 0);
|
|
2323
2330
|
|
|
2324
|
-
|
|
2331
|
+
ye([ Vt({
|
|
2325
2332
|
type: S,
|
|
2326
2333
|
tooltip: "取消按钮"
|
|
2327
|
-
}),
|
|
2334
|
+
}), _e("design:type", typeof (Ht = typeof S !== "undefined" && S) === "function" ? Ht : Object) ], qt.prototype, "btn_cancel", void 0);
|
|
2328
2335
|
|
|
2329
|
-
|
|
2336
|
+
ye([ Vt({
|
|
2330
2337
|
type: U,
|
|
2331
2338
|
tooltip: "取消按钮精灵图"
|
|
2332
|
-
}),
|
|
2339
|
+
}), _e("design:type", typeof ($t = typeof U !== "undefined" && U) === "function" ? $t : Object) ], qt.prototype, "cancel_spriteFrame", void 0);
|
|
2333
2340
|
|
|
2334
|
-
|
|
2341
|
+
ye([ Vt({
|
|
2335
2342
|
type: S,
|
|
2336
2343
|
tooltip: "关闭按钮"
|
|
2337
|
-
}),
|
|
2344
|
+
}), _e("design:type", typeof (Kt = typeof S !== "undefined" && S) === "function" ? Kt : Object) ], qt.prototype, "btn_close", void 0);
|
|
2338
2345
|
|
|
2339
|
-
qt =
|
|
2346
|
+
qt = ye([ Wt("CoreUIModal"), zt("CATCORE/CoreUIModal") ], qt);
|
|
2340
2347
|
|
|
2341
2348
|
var Qt;
|
|
2342
2349
|
|
|
@@ -2480,7 +2487,7 @@ const Xt = function() {
|
|
|
2480
2487
|
|
|
2481
2488
|
const Zt = e._cat ??= Manager.instance;
|
|
2482
2489
|
|
|
2483
|
-
|
|
2490
|
+
_.onPostProjectInitDelegate.add(async () => {
|
|
2484
2491
|
console.time("[Init App]");
|
|
2485
2492
|
try {
|
|
2486
2493
|
await Zt.boot();
|