@shimotsuki/core 1.0.10 → 1.0.12
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 +46 -10
- package/dist/index.js +1 -2578
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -970,12 +970,12 @@ type UIComponentType<T> = T extends UILayer<infer U> ? U : void;
|
|
|
970
970
|
type SceneComponentType<T> = T extends SceneLayer<infer U> ? U : void;
|
|
971
971
|
/**预制体路径 */
|
|
972
972
|
declare enum BasePrefab {
|
|
973
|
-
Root = "root",
|
|
974
|
-
Toast = "toast",
|
|
975
|
-
BlackMask = "black-mask",
|
|
976
|
-
Loading = "loading",
|
|
977
|
-
Notice = "notice",
|
|
978
|
-
Reconnection = "reconnection"
|
|
973
|
+
Root = "prefabs/root",
|
|
974
|
+
Toast = "prefabs/toast",
|
|
975
|
+
BlackMask = "prefabs/black-mask",
|
|
976
|
+
Loading = "prefabs/loading",
|
|
977
|
+
Notice = "prefabs/notice",
|
|
978
|
+
Reconnection = "prefabs/reconnection"
|
|
979
979
|
}
|
|
980
980
|
declare class GuiManager extends BaseManager {
|
|
981
981
|
#private;
|
|
@@ -988,7 +988,44 @@ declare class GuiManager extends BaseManager {
|
|
|
988
988
|
*/
|
|
989
989
|
private getGuiPrefabByType;
|
|
990
990
|
/**初始化 */
|
|
991
|
-
init(bundleName?: string
|
|
991
|
+
init(bundleName?: string): Promise<this>;
|
|
992
|
+
}
|
|
993
|
+
|
|
994
|
+
type TimerCallback = (executionTime: number) => void;
|
|
995
|
+
declare class TimerManager extends BaseManager {
|
|
996
|
+
private timers;
|
|
997
|
+
private lastUpdateTime;
|
|
998
|
+
constructor(cat: Manager);
|
|
999
|
+
private onHandleAppBackground;
|
|
1000
|
+
private onHandleAppForeground;
|
|
1001
|
+
/**
|
|
1002
|
+
* 注册一个计时器
|
|
1003
|
+
* @param tag 注册计时器的对象
|
|
1004
|
+
* @param interval 间隔时间(毫秒)
|
|
1005
|
+
* @param callback 计时器回调函数
|
|
1006
|
+
* @returns 计时器的唯一标识
|
|
1007
|
+
*/
|
|
1008
|
+
registerInterval(tag: any, interval: number, callback: TimerCallback): void;
|
|
1009
|
+
/**
|
|
1010
|
+
* 注册一个延时器
|
|
1011
|
+
* @param tag 注册延时器的对象
|
|
1012
|
+
* @param delay 延时时间(毫秒)
|
|
1013
|
+
* @param callback 延时器回调函数
|
|
1014
|
+
* @returns 延时器的唯一标识
|
|
1015
|
+
*/
|
|
1016
|
+
registerDelay(tag: any, delay: number, callback: TimerCallback): void;
|
|
1017
|
+
/**
|
|
1018
|
+
* 取消一个计时器或延时器
|
|
1019
|
+
* @param tag 计时器或延时器的唯一标识
|
|
1020
|
+
*/
|
|
1021
|
+
unregister(tag: any): void;
|
|
1022
|
+
/**是否拥有定时器 */
|
|
1023
|
+
has(object: any): boolean;
|
|
1024
|
+
/**
|
|
1025
|
+
* 更新计时器状态
|
|
1026
|
+
* @param dt 间隔时间(毫秒)
|
|
1027
|
+
*/
|
|
1028
|
+
private update;
|
|
992
1029
|
}
|
|
993
1030
|
|
|
994
1031
|
/**
|
|
@@ -1013,8 +1050,7 @@ declare class Manager {
|
|
|
1013
1050
|
/**工具类 */
|
|
1014
1051
|
util: CoreUtil;
|
|
1015
1052
|
/**GUI资源配置 */
|
|
1016
|
-
setConfig: ({
|
|
1017
|
-
gui_path?: string;
|
|
1053
|
+
setConfig: ({ gui_bundleName }?: {
|
|
1018
1054
|
gui_bundleName?: string;
|
|
1019
1055
|
}) => this;
|
|
1020
1056
|
/**启动 */
|
|
@@ -1022,4 +1058,4 @@ declare class Manager {
|
|
|
1022
1058
|
}
|
|
1023
1059
|
declare const cat: Manager;
|
|
1024
1060
|
|
|
1025
|
-
export { AudioEventConstant, AudioSourceBaseComponent, AudioTypeEnum, BaseComponent, BaseManager, BasePrefab, CoreBlackMask, CoreNotice, type CoreNoticeProps, CoreReconnection, CoreShowLoading, type CoreShowLoadingProps, CoreToast, CoreUIContainer, CoreUIModal, type CoreUIModalProps, CoreUtil, GlobalEventConstant, Gui, GuiManager, type HOOK, type ICloseOptions, type IDirection, type IOpenOptions, type IUIOption, LayerType, Manager, ReconnectPrompt, type SceneComponentType, type SceneDataType, SceneLayer, type ScenePropsType, type ToastProps, ToastType, type UIComponentType, UILayer, WrapperSocialGameClient, cat };
|
|
1061
|
+
export { AudioEventConstant, AudioManager, AudioSourceBaseComponent, AudioTypeEnum, BaseComponent, BaseManager, BasePrefab, CoreBlackMask, CoreNotice, type CoreNoticeProps, CoreReconnection, CoreShowLoading, type CoreShowLoadingProps, CoreToast, CoreUIContainer, CoreUIModal, type CoreUIModalProps, CoreUtil, type EventKeyType, GlobalEventConstant, Gui, GuiManager, type HOOK, type ICloseOptions, type IDirection, type IOpenOptions, type IUIOption, LayerType, type ListenerFunc, Manager, MessageManager, ReconnectPrompt, type SceneComponentType, type SceneDataType, SceneLayer, type ScenePropsType, TimerManager, type ToastProps, ToastType, type UIComponentType, UILayer, WrapperSocialGameClient, cat };
|