@shimotsuki/core 2.0.70 → 2.0.72

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 CHANGED
@@ -1,17 +1,18 @@
1
- import { Component, Node, Prefab, Vec3, Quat, math, Layers, AudioClip, AudioSource, Label, Button, Scene, Asset, Constructor, AssetManager, AsyncDelegate, SpriteFrame, Sprite } from 'cc';
1
+ import { Component, Node, Prefab, Vec3, Quat, math, Layers, AudioClip, AudioSource, Label, Button, Scene, AsyncDelegate, Asset, Constructor, AssetManager, SpriteFrame, Sprite } from 'cc';
2
+ import EventEmitter from 'eventemitter3';
2
3
  import { IReactionPublic, IReactionOptions } from '@shimotsuki/mobx';
3
- import EventEmitter, { EventEmitter as EventEmitter$1 } from 'eventemitter3';
4
- import * as crypto_es_lib_cipher_core from 'crypto-es/lib/cipher-core';
4
+ import { ClientOption as ClientOption$1 } from 'pitayaclient';
5
+ import { SocialGameClient, SocialGameClientOption, AllEventResponsePairs, ClientOption, AudienceOptionsJson } from 'sgc';
5
6
  import { DescMessage, MessageShape } from '@bufbuild/protobuf';
6
- import { ClientOption } from 'pitayaclient';
7
- import { SocialGameClient, SocialGameClientOption, AllEventResponsePairs, AudienceOptionsJson } from 'sgc';
8
7
  import { ReflectMessage } from '@bufbuild/protobuf/reflect';
8
+ import * as crypto_es_lib_cipher_core from 'crypto-es/lib/cipher-core';
9
9
 
10
10
  /**
11
11
  * @describe 基础管理类
12
12
  * @author 游金宇(KM)
13
13
  * @date 2024-09-12 11:49:30
14
14
  */
15
+
15
16
  declare class BaseManager {
16
17
  protected cat: Manager;
17
18
  constructor(manager: Manager);
@@ -118,57 +119,6 @@ declare class AudioManager extends BaseManager {
118
119
  load(): void;
119
120
  }
120
121
 
121
- /**
122
- * @describe 本地存储管理
123
- * @author 游金宇(KM)
124
- * @date 2023-08-03 17:58:51
125
- */
126
-
127
- declare class StorageManager extends BaseManager {
128
- private _key;
129
- private _iv;
130
- private _id;
131
- /**
132
- * 初始化密钥
133
- * @param key aes加密的key
134
- * @param iv aes加密的iv
135
- */
136
- init(key: string, iv: string): void;
137
- /**
138
- * 设置用户唯一标识
139
- * @param id
140
- */
141
- setUser(id: string): void;
142
- /**
143
- * 存储本地数据
144
- * @param key 存储key
145
- * @param value 存储值
146
- * @returns
147
- */
148
- set(key: string, value: any): void;
149
- /**
150
- * 获取指定关键字的数据
151
- * @param key 获取的关键字
152
- * @param defaultValue 获取的默认值
153
- * @returns
154
- */
155
- get(key: string, defaultValue?: any): string;
156
- /** 获取指定关键字的数值 */
157
- getNumber(key: string, defaultValue?: number): number;
158
- /** 获取指定关键字的布尔值 */
159
- getBoolean(key: string): boolean;
160
- /** 获取指定关键字的JSON对象 */
161
- getJson(key: string, defaultValue?: any): any;
162
- /**
163
- * 删除指定关键字的数据
164
- * @param key 需要移除的关键字
165
- * @returns
166
- */
167
- remove(key: string): void;
168
- /** 清空整个本地存储 */
169
- clear(): void;
170
- }
171
-
172
122
  /**
173
123
  * @describe 组件基类
174
124
  * @author 游金宇(KM)
@@ -194,6 +144,7 @@ declare class BaseComponent<T extends object = {}, K extends object = {}> extend
194
144
  props: T;
195
145
  /**自由属性 */
196
146
  data: K;
147
+ cat: typeof globalThis._cat;
197
148
  /**autorun销毁 */
198
149
  private autorunDisposers;
199
150
  /**reaction销毁 */
@@ -215,7 +166,7 @@ declare class BaseComponent<T extends object = {}, K extends object = {}> extend
215
166
  protected onDisable(): void;
216
167
  private deleteAllEventByEmitter;
217
168
  protected onEnable(): void;
218
- /**子类继承该方法(全局事件(cat.event)注册在components上的事件可以不添加取消监听(自动取消监听了)) */
169
+ /**子类继承该方法(全局事件(this.cat.event)注册在components上的事件可以不添加取消监听(自动取消监听了)) */
219
170
  protected onEventListener(): void;
220
171
  /**子类继承该方法 */
221
172
  protected addListener(): void;
@@ -419,40 +370,6 @@ declare class CoreShowLoading extends RootUILayer<CoreShowLoadingProps> {
419
370
  update(deltaTime: number): void;
420
371
  }
421
372
 
422
- declare enum ReconnectPrompt {
423
- RECONNECTED = "\u91CD\u8FDE\u6210\u529F",
424
- RECONNECTING = "\u6B63\u5728\u91CD\u8FDE",
425
- MAX_RECONNECT = "\u91CD\u8FDE\u6B21\u6570\u8D85\u51FA\u9650\u5236,\u8BF7\u68C0\u67E5\u7F51\u7EDC",
426
- RECONNECTED_ERROR = "\u91CD\u8FDE\u5931\u8D25,\u8BF7\u68C0\u67E5\u7F51\u7EDC",
427
- CONNECT_PARAM_ERROR = "\u6E38\u620F\u53C2\u6570\u9519\u8BEF,\u8BF7\u91CD\u65B0\u52A0\u8F7D",
428
- KICK = "\u8D26\u53F7\u5DF2\u4E0B\u7EBF",
429
- OFFLINE = "\u7F51\u7EDC\u5DF2\u65AD\u5F00",
430
- ONLINE = "\u7F51\u7EDC\u5DF2\u8FDE\u63A5",
431
- GAME_ERROR = "\u8FDE\u63A5\u6E38\u620F\u670D\u9519\u8BEF"
432
- }
433
- type CoreReconnectionProps = {
434
- content: ReconnectPrompt | null;
435
- };
436
- /**
437
- * @describe 重连框
438
- * @author 游金宇(KM)
439
- * @date 2024-09-12 11:49:51
440
- */
441
- declare class CoreReconnection extends RootUILayer<CoreReconnectionProps> {
442
- common_prompt_text: Label;
443
- btn_confirm: Button;
444
- btn_close: Button;
445
- protected is_close: boolean;
446
- props: CoreReconnectionProps;
447
- protected initUI(): void;
448
- protected onLoad(): void;
449
- onDestroy(): void;
450
- updateProps(props: ReconnectPrompt): void;
451
- /**更新提示文案 */
452
- protected updatePromptText(text: ReconnectPrompt, isAnim?: boolean): void;
453
- protected onConfirmHandler(): void;
454
- }
455
-
456
373
  type CoreNoticeProps = {
457
374
  text: string;
458
375
  confrim?: () => void;
@@ -498,6 +415,18 @@ declare class SceneLayer<T extends object = Object, K extends object = {}> exten
498
415
  isReload: boolean;
499
416
  }
500
417
 
418
+ declare enum ReconnectPrompt {
419
+ RECONNECTED = "\u91CD\u8FDE\u6210\u529F",
420
+ RECONNECTING = "\u6B63\u5728\u91CD\u8FDE",
421
+ MAX_RECONNECT = "\u91CD\u8FDE\u6B21\u6570\u8D85\u51FA\u9650\u5236,\u8BF7\u68C0\u67E5\u7F51\u7EDC",
422
+ RECONNECTED_ERROR = "\u91CD\u8FDE\u5931\u8D25,\u8BF7\u68C0\u67E5\u7F51\u7EDC",
423
+ CONNECT_PARAM_ERROR = "\u6E38\u620F\u53C2\u6570\u9519\u8BEF,\u8BF7\u91CD\u65B0\u52A0\u8F7D",
424
+ KICK = "\u8D26\u53F7\u5DF2\u4E0B\u7EBF",
425
+ OFFLINE = "\u7F51\u7EDC\u5DF2\u65AD\u5F00",
426
+ ONLINE = "\u7F51\u7EDC\u5DF2\u8FDE\u63A5",
427
+ GAME_ERROR = "\u8FDE\u63A5\u6E38\u620F\u670D\u9519\u8BEF"
428
+ }
429
+
501
430
  /**
502
431
  * @describe GUI组件类
503
432
  * @author 游金宇(KM)
@@ -540,7 +469,6 @@ declare class Gui extends BaseComponent {
540
469
  root_ui: Node;
541
470
  root_toast: Node;
542
471
  root_mask: Node;
543
- private cat;
544
472
  /**场景中的UI层 */
545
473
  private ui_container_component;
546
474
  /**断线重连UI弹窗 */
@@ -614,6 +542,128 @@ declare class Gui extends BaseComponent {
614
542
  private onRootUpdate;
615
543
  }
616
544
 
545
+ declare class CoreBlackMask extends BaseComponent {
546
+ tween: Node;
547
+ }
548
+
549
+ /**
550
+ * @describe UI容器管理 在场景节点下 会随着场景销毁(非常驻节点)
551
+ * @author 游金宇(KM)
552
+ * @date 2024-09-12 11:45:31
553
+ */
554
+
555
+ declare class CoreUIContainer extends UILayer {
556
+ scene_mask_node: Node;
557
+ ui_container: Node;
558
+ gui: Gui;
559
+ protected onLoad(): void;
560
+ get scene_mask(): CoreBlackMask;
561
+ get brother(): Node[];
562
+ get tweenChildren(): Node[];
563
+ protected onEventListener(): void;
564
+ /**增加层级 */
565
+ addMask(): void;
566
+ /**减少层级 */
567
+ subMask(): void;
568
+ blockMaskSiblingIndexChanged(): void;
569
+ /**
570
+ * 将UI节点挂载在tween上执行动画
571
+ * @param node 节点
572
+ */
573
+ addNodeToTween(node: Node): this;
574
+ show(): void;
575
+ hide(): void;
576
+ setGui(gui: Gui): this;
577
+ /**根层的变化 */
578
+ uiMaskChanged(): void;
579
+ setSceneMaskActive(active: boolean): void;
580
+ }
581
+
582
+ /**
583
+ * @describe 层级界面管理
584
+ * @author 游金宇(KM)
585
+ * @date 2023-08-03 20:02:45
586
+ */
587
+
588
+ type UIComponentType<T> = T extends UILayer<infer U> ? U : void;
589
+ type SceneComponentType<T> = T extends SceneLayer<infer U> ? U : void;
590
+ /**预制体路径 */
591
+ declare enum BasePrefab {
592
+ Root = "prefabs/root",
593
+ Toast = "prefabs/toast",
594
+ BlackMask = "prefabs/black-mask",
595
+ Loading = "prefabs/loading",
596
+ Notice = "prefabs/notice",
597
+ Reconnection = "prefabs/reconnection"
598
+ }
599
+ declare class GuiManager extends BaseManager {
600
+ #private;
601
+ /**常驻顶层UI节点层级 */
602
+ gui: Gui;
603
+ /**
604
+ * 获取预制体
605
+ * @param type 类型
606
+ * @returns
607
+ */
608
+ private getGuiPrefabByType;
609
+ /**初始化 */
610
+ init(): Promise<this>;
611
+ }
612
+
613
+ /**
614
+ * @describe 基于社交游戏封装的游戏基础ws类
615
+ * @author 游金宇(KM)
616
+ * @date 2024-09-12 11:47:51
617
+ */
618
+
619
+ declare class WrapperSocialGameClient extends SocialGameClient {
620
+ /**日志黑名单 */
621
+ protected logBlackList: string[];
622
+ ignore: (route: string) => boolean;
623
+ constructor(name: string, opts: Partial<SocialGameClientOption>, eventResponsePairs: Partial<AllEventResponsePairs>, clientOption?: ClientOption);
624
+ destroy(): void;
625
+ GameRequest<U extends DescMessage>(route: string, reqReflect: ReflectMessage, resp: U, audOptions?: AudienceOptionsJson): Promise<MessageShape<U>>;
626
+ subscribe<T extends DescMessage>(route: string, respType: T, fn?: (data: MessageShape<T>) => void): this;
627
+ }
628
+
629
+ declare class SocialGameClientManager extends BaseManager {
630
+ private managedClients;
631
+ /**在线 */
632
+ private isGlobalOnline;
633
+ /**在后台 */
634
+ private isInBackground;
635
+ /**正在重连 */
636
+ private reconnecting;
637
+ /**后台委托 */
638
+ readonly onEventHideDelegate: AsyncDelegate<() => (Promise<void> | void)>;
639
+ /**前台委托 */
640
+ readonly onEventShowDelegate: AsyncDelegate<() => (Promise<void> | void)>;
641
+ /**重载场景委托 */
642
+ readonly onEventReloadSceneDelegate: AsyncDelegate<() => (Promise<void> | void)>;
643
+ /**重连定时器 */
644
+ private reconnectTimer;
645
+ private scheduleReconnect;
646
+ get activeClients(): WrapperSocialGameClient[];
647
+ constructor(cat: Manager);
648
+ /**
649
+ * 创建并注册WebSocket客户端
650
+ * @param name 客户端唯一标识(如"game", "room")
651
+ * @param clientOption 客户端配置选项
652
+ * @param opts 社交游戏选项
653
+ * @param eventResponsePairs 事件响应配置
654
+ */
655
+ createWebSocket(name: string, clientOption: ClientOption$1, opts: Partial<SocialGameClientOption>, eventResponsePairs: Partial<AllEventResponsePairs>): WrapperSocialGameClient;
656
+ register(client: WrapperSocialGameClient): void;
657
+ unregister(client: WrapperSocialGameClient): void;
658
+ private initGlobalListeners;
659
+ private handleGlobalStateChange;
660
+ private triggerReconnectAll;
661
+ private disconnectAll;
662
+ private handleSingleClose;
663
+ private handleSingleReconnect;
664
+ private handleSingleKick;
665
+ }
666
+
617
667
  /**
618
668
  * @describe 游戏资管理
619
669
  * @author 游金宇(KM)
@@ -724,6 +774,20 @@ declare class ResLoader {
724
774
  dump: () => void;
725
775
  }
726
776
 
777
+ /**
778
+ * @describe 基本数据
779
+ * @author 游金宇(KM)
780
+ * @date 2024-09-12 11:35:02
781
+ */
782
+
783
+ declare class BaseStore {
784
+ protected rootStore: CoreStore;
785
+ constructor(rootStore: CoreStore);
786
+ }
787
+
788
+ declare class CoreStore extends BaseManager {
789
+ }
790
+
727
791
  /**
728
792
  * MD5加密
729
793
  * @param msg 加密信息
@@ -776,69 +840,107 @@ declare class CoreUtil extends BaseManager {
776
840
  }
777
841
 
778
842
  /**
779
- * @describe 基于社交游戏封装的游戏基础ws类
843
+ * @describe 本地存储管理
780
844
  * @author 游金宇(KM)
781
- * @date 2024-09-12 11:47:51
845
+ * @date 2023-08-03 17:58:51
782
846
  */
783
- declare class WrapperSocialGameClient extends SocialGameClient {
784
- /**日志黑名单 */
785
- protected logBlackList: string[];
786
- ignore: (route: string) => boolean;
787
- constructor(name: string, opts: Partial<SocialGameClientOption>, eventResponsePairs: Partial<AllEventResponsePairs>, clientOption?: ClientOption);
788
- destroy(): void;
789
- GameRequest<U extends DescMessage>(route: string, reqReflect: ReflectMessage, resp: U, audOptions?: AudienceOptionsJson): Promise<MessageShape<U>>;
790
- subscribe<T extends DescMessage>(route: string, respType: T, fn?: (data: MessageShape<T>) => void): this;
791
- }
792
- declare class SocialGameClientManager extends BaseManager {
793
- private managedClients;
794
- /**在线 */
795
- private isGlobalOnline;
796
- /**在后台 */
797
- private isInBackground;
798
- /**正在重连 */
799
- private reconnecting;
800
- /**后台委托 */
801
- readonly onEventHideDelegate: AsyncDelegate<() => (Promise<void> | void)>;
802
- /**前台委托 */
803
- readonly onEventShowDelegate: AsyncDelegate<() => (Promise<void> | void)>;
804
- /**重载场景委托 */
805
- readonly onEventReloadSceneDelegate: AsyncDelegate<() => (Promise<void> | void)>;
806
- /**重连定时器 */
807
- private reconnectTimer;
808
- private scheduleReconnect;
809
- get activeClients(): WrapperSocialGameClient[];
810
- constructor(cat: Manager);
847
+
848
+ declare class StorageManager extends BaseManager {
849
+ private _key;
850
+ private _iv;
851
+ private _id;
811
852
  /**
812
- * 创建并注册WebSocket客户端
813
- * @param name 客户端唯一标识(如"game", "room")
814
- * @param clientOption 客户端配置选项
815
- * @param opts 社交游戏选项
816
- * @param eventResponsePairs 事件响应配置
817
- */
818
- createWebSocket(name: string, clientOption: ClientOption, opts: Partial<SocialGameClientOption>, eventResponsePairs: Partial<AllEventResponsePairs>): WrapperSocialGameClient;
819
- register(client: WrapperSocialGameClient): void;
820
- unregister(client: WrapperSocialGameClient): void;
821
- private initGlobalListeners;
822
- private handleGlobalStateChange;
823
- private triggerReconnectAll;
824
- private disconnectAll;
825
- private handleSingleClose;
826
- private handleSingleReconnect;
827
- private handleSingleKick;
853
+ * 初始化密钥
854
+ * @param key aes加密的key
855
+ * @param iv aes加密的iv
856
+ */
857
+ init(key: string, iv: string): void;
858
+ /**
859
+ * 设置用户唯一标识
860
+ * @param id
861
+ */
862
+ setUser(id: string): void;
863
+ /**
864
+ * 存储本地数据
865
+ * @param key 存储key
866
+ * @param value 存储值
867
+ * @returns
868
+ */
869
+ set(key: string, value: any): void;
870
+ /**
871
+ * 获取指定关键字的数据
872
+ * @param key 获取的关键字
873
+ * @param defaultValue 获取的默认值
874
+ * @returns
875
+ */
876
+ get(key: string, defaultValue?: any): string;
877
+ /** 获取指定关键字的数值 */
878
+ getNumber(key: string, defaultValue?: number): number;
879
+ /** 获取指定关键字的布尔值 */
880
+ getBoolean(key: string): boolean;
881
+ /** 获取指定关键字的JSON对象 */
882
+ getJson(key: string, defaultValue?: any): any;
883
+ /**
884
+ * 删除指定关键字的数据
885
+ * @param key 需要移除的关键字
886
+ * @returns
887
+ */
888
+ remove(key: string): void;
889
+ /** 清空整个本地存储 */
890
+ clear(): void;
828
891
  }
829
892
 
830
893
  /**
831
- * @describe 基本数据
894
+ * @describe 管理类
832
895
  * @author 游金宇(KM)
833
- * @date 2024-09-12 11:35:02
896
+ * @date 2024-09-12 11:49:44
834
897
  */
835
898
 
836
- declare class BaseStore {
837
- protected rootStore: CoreStore;
838
- constructor(rootStore: CoreStore);
839
- }
840
-
841
- declare class CoreStore extends BaseManager {
899
+ declare class Manager {
900
+ #private;
901
+ static get instance(): Manager;
902
+ /**APP初始化事务 */
903
+ readonly onAppInitDelegate: AsyncDelegate<() => (Promise<void> | void)>;
904
+ /**插件初始化事务 */
905
+ readonly onPlugInInitDelegate: AsyncDelegate<() => (Promise<void> | void)>;
906
+ /**音频管理 */
907
+ get audio(): AudioManager;
908
+ /**全局事件管理 */
909
+ get event(): EventEmitter<string | symbol, any>;
910
+ /**gui管理 */
911
+ get gui(): Gui;
912
+ /**本地存储管理 */
913
+ get storage(): StorageManager;
914
+ /**资源管理 */
915
+ get res(): ResLoader;
916
+ /**工具类管理 */
917
+ get util(): CoreUtil;
918
+ /**社交游戏类 */
919
+ get socialGameClient(): SocialGameClientManager;
920
+ /**数据存储 */
921
+ get store(): CoreStore;
922
+ /**GUI bundle 名称 */
923
+ get gui_bundle_name(): string;
924
+ /**音效本地存储key */
925
+ get audio_local_store_key(): string;
926
+ /**默认音效路径 */
927
+ get default_audio_effect(): string;
928
+ /**GUI资源配置 */
929
+ setConfig: ({ default_audio_effect, gui_bundleName, audio_local_store_key }?: {
930
+ gui_bundleName?: string;
931
+ audio_local_store_key?: string;
932
+ default_audio_effect?: string;
933
+ }) => this;
934
+ /**启动 */
935
+ boot(): Promise<void>;
936
+ /**合并对象 */
937
+ merge<K extends keyof Manager, T extends object>(target: K, source: T): this;
938
+ /**
939
+ * 注册一个“插件级”初始化回调
940
+ * - 如果已初始化,立即执行
941
+ * - 否则排队到 onPlugInInitDelegate 中
942
+ */
943
+ appendPlugInInitDelegate(cb: () => Promise<void> | void): this;
842
944
  }
843
945
 
844
946
  declare enum AudioEventConstant {
@@ -916,72 +1018,27 @@ declare class CoreUIModal extends UILayer<CoreUIModalProps> {
916
1018
  private onCloseHandler;
917
1019
  }
918
1020
 
919
- declare class CoreBlackMask extends BaseComponent {
920
- tween: Node;
921
- }
922
-
1021
+ type CoreReconnectionProps = {
1022
+ content: ReconnectPrompt | null;
1023
+ };
923
1024
  /**
924
- * @describe UI容器管理 在场景节点下 会随着场景销毁(非常驻节点)
1025
+ * @describe 重连框
925
1026
  * @author 游金宇(KM)
926
- * @date 2024-09-12 11:45:31
1027
+ * @date 2024-09-12 11:49:51
927
1028
  */
928
-
929
- declare class CoreUIContainer extends UILayer {
930
- scene_mask_node: Node;
931
- ui_container: Node;
932
- gui: Gui;
1029
+ declare class CoreReconnection extends RootUILayer<CoreReconnectionProps> {
1030
+ common_prompt_text: Label;
1031
+ btn_confirm: Button;
1032
+ btn_close: Button;
1033
+ protected is_close: boolean;
1034
+ props: CoreReconnectionProps;
1035
+ protected initUI(): void;
933
1036
  protected onLoad(): void;
934
- get scene_mask(): CoreBlackMask;
935
- get brother(): Node[];
936
- get tweenChildren(): Node[];
937
- protected onEventListener(): void;
938
- /**增加层级 */
939
- addMask(): void;
940
- /**减少层级 */
941
- subMask(): void;
942
- blockMaskSiblingIndexChanged(): void;
943
- /**
944
- * 将UI节点挂载在tween上执行动画
945
- * @param node 节点
946
- */
947
- addNodeToTween(node: Node): this;
948
- show(): void;
949
- hide(): void;
950
- setGui(gui: Gui): this;
951
- /**根层的变化 */
952
- uiMaskChanged(): void;
953
- setSceneMaskActive(active: boolean): void;
954
- }
955
-
956
- /**
957
- * @describe 层级界面管理
958
- * @author 游金宇(KM)
959
- * @date 2023-08-03 20:02:45
960
- */
961
-
962
- type UIComponentType<T> = T extends UILayer<infer U> ? U : void;
963
- type SceneComponentType<T> = T extends SceneLayer<infer U> ? U : void;
964
- /**预制体路径 */
965
- declare enum BasePrefab {
966
- Root = "prefabs/root",
967
- Toast = "prefabs/toast",
968
- BlackMask = "prefabs/black-mask",
969
- Loading = "prefabs/loading",
970
- Notice = "prefabs/notice",
971
- Reconnection = "prefabs/reconnection"
972
- }
973
- declare class GuiManager extends BaseManager {
974
- #private;
975
- /**常驻顶层UI节点层级 */
976
- gui: Gui;
977
- /**
978
- * 获取预制体
979
- * @param type 类型
980
- * @returns
981
- */
982
- private getGuiPrefabByType;
983
- /**初始化 */
984
- init(): Promise<this>;
1037
+ onDestroy(): void;
1038
+ updateProps(props: ReconnectPrompt): void;
1039
+ /**更新提示文案 */
1040
+ protected updatePromptText(text: ReconnectPrompt, isAnim?: boolean): void;
1041
+ protected onConfirmHandler(): void;
985
1042
  }
986
1043
 
987
1044
  type TimerCallback = (executionTime: number) => void;
@@ -1024,58 +1081,10 @@ declare class TimerManager extends BaseManager {
1024
1081
  declare const AudioEffect: <T extends string>(effect?: T, callBackFun?: Function) => MethodDecorator;
1025
1082
  declare const ButtonLock: (lockTime?: number, callBackFun?: Function) => (_target: any, _propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor;
1026
1083
 
1027
- /**
1028
- * @describe 管理类
1029
- * @author 游金宇(KM)
1030
- * @date 2024-09-12 11:49:44
1031
- */
1032
- declare class Manager {
1033
- #private;
1034
- static get instance(): Manager;
1035
- /**APP初始化事务 */
1036
- readonly onAppInitDelegate: AsyncDelegate<() => (Promise<void> | void)>;
1037
- /**插件初始化事务 */
1038
- readonly onPlugInInitDelegate: AsyncDelegate<() => (Promise<void> | void)>;
1039
- /**音频管理 */
1040
- get audio(): AudioManager;
1041
- /**全局事件管理 */
1042
- get event(): EventEmitter$1<string | symbol, any>;
1043
- /**gui管理 */
1044
- get gui(): Gui;
1045
- /**本地存储管理 */
1046
- get storage(): StorageManager;
1047
- /**资源管理 */
1048
- get res(): ResLoader;
1049
- /**工具类管理 */
1050
- get util(): CoreUtil;
1051
- /**社交游戏类 */
1052
- get socialGameClient(): SocialGameClientManager;
1053
- /**数据存储 */
1054
- get store(): CoreStore;
1055
- /**GUI bundle 名称 */
1056
- get gui_bundle_name(): string;
1057
- /**音效本地存储key */
1058
- get audio_local_store_key(): string;
1059
- /**默认音效路径 */
1060
- get default_audio_effect(): string;
1061
- /**GUI资源配置 */
1062
- setConfig: ({ default_audio_effect, gui_bundleName, audio_local_store_key }?: {
1063
- gui_bundleName?: string;
1064
- audio_local_store_key?: string;
1065
- default_audio_effect?: string;
1066
- }) => this;
1067
- /**启动 */
1068
- boot(): Promise<void>;
1069
- /**合并对象 */
1070
- merge<K extends keyof Manager, T extends object>(target: K, source: T): this;
1071
- /**
1072
- * 注册一个“插件级”初始化回调
1073
- * - 如果已初始化,立即执行
1074
- * - 否则排队到 onPlugInInitDelegate 中
1075
- */
1076
- appendPlugInInitDelegate(cb: () => Promise<void> | void): this;
1084
+ declare global {
1085
+ var _cat: Manager;
1077
1086
  }
1078
1087
  declare const cat: Manager;
1079
1088
 
1080
- export { AudioEffect, AudioEventConstant, AudioManager, AudioSourceBaseComponent, AudioSourceUILayer, AudioTypeEnum, BaseComponent, BaseManager, BasePrefab, BaseStore, ButtonLock, CoreBlackMask, CoreNotice, CoreReconnection, CoreShowLoading, CoreStore, CoreToast, CoreUIContainer, CoreUIModal, CoreUtil, GlobalEventConstant, Gui, GuiManager, LayerType, Manager, ReconnectPrompt, RootUILayer, SceneLayer, TimerManager, ToastType, UILayer, WrapperSocialGameClient, cat };
1089
+ export { AudioEffect, AudioEventConstant, AudioManager, AudioSourceBaseComponent, AudioSourceUILayer, AudioTypeEnum, BaseComponent, BaseManager, BasePrefab, BaseStore, ButtonLock, CoreBlackMask, CoreNotice, CoreReconnection, CoreShowLoading, CoreStore, CoreToast, CoreUIContainer, CoreUIModal, CoreUtil, GlobalEventConstant, Gui, GuiManager, LayerType, ReconnectPrompt, RootUILayer, SceneLayer, TimerManager, ToastType, UILayer, WrapperSocialGameClient, cat };
1081
1090
  export type { CoreNoticeProps, CoreShowLoadingProps, CoreUIModalProps, HOOK, ICloseOptions, IDirection, IOpenOptions, IUIOption, SceneComponentType, SceneDataType, ScenePropsType, ToastProps, UIComponentType };