Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
1226085293 committed Apr 15, 2024
2 parents f715542 + 4efcb86 commit a005b2c
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 18 deletions.
4 changes: 2 additions & 2 deletions assets/@framework/guide/mk_guide_manage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ export namespace mk_guide_manage_ {
/**
* 加载步骤
* @remarks
* 加载步骤(场景/操作)前调用,可在此处打开遮罩
* 加载步骤(场景/操作)前调用
*/
loading_step(): void;
/**
Expand All @@ -333,7 +333,7 @@ export namespace mk_guide_manage_ {
/**
* 加载步骤完成
* @remarks
* 步骤 load 执行后调用,可在此处关闭遮罩
* 步骤 load 执行后调用
*/
loading_step_complete(): void;
/** 中断 */
Expand Down
1 change: 0 additions & 1 deletion assets/@framework/mk_event_target.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ class mk_event_target<CT> extends cc.EventTarget {
* 请求事件
* @param type_ 事件类型
* @param args_ 事件参数
* @beta
* @remarks
* 等待请求事件返回
*/
Expand Down
2 changes: 0 additions & 2 deletions assets/@framework/mk_game.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ export class mk_game extends mk_instance_base {

/**
* 暂停节点
* @beta
* @param node_ 目标节点
* @param recursion_b_ 是否递归子节点
*/
Expand Down Expand Up @@ -89,7 +88,6 @@ export class mk_game extends mk_instance_base {

/**
* 恢复节点
* @beta
* @param node_ 目标节点
* @param recursion_b_ 是否递归子节点
*/
Expand Down
5 changes: 2 additions & 3 deletions assets/@framework/mk_storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,9 @@ class mk_storage<CT extends Object> {
* 设置存储数据
* @param key_ 存储键
* @param data_ 存储数据
* @param effective_time_ms_n_ 失效时间
* @returns storage.status
* @returns 成功状态
*/
set<T extends keyof CT>(key_: T, data_: any): boolean {
set<T extends keyof CT, T2 extends CT[T]>(key_: T, data_: T2): boolean {
const key_s = String(key_);

try {
Expand Down
2 changes: 1 addition & 1 deletion assets/@framework/resources/mk_asset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ namespace _mk_asset {
*
* - 通过 cache_lifetime_ms_n 修复短时间内(释放/加载)同一资源导致加载资源是已释放后的问题
*
* - 解决同时加载同一资源多次导致返回的资源对象不一致的问(对象不一致会导致引用计数不一致)
* - 解决同时加载同一资源多次导致返回的资源对象不一致(对象不一致会导致引用计数不一致)
*
* - 增加强制性资源跟随释放对象
*/
Expand Down
34 changes: 25 additions & 9 deletions declare/mk.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,14 @@ declare namespace mk {
has<T extends keyof CT, T2 extends (...event_: Parameters<CT[T]>) => void>(type_: T, callback_?: T2, target_?: any): boolean;
/** 清空所有事件 */
clear(): void;
/* Excluded from this release type: request */
/**
* 请求事件
* @param type_ 事件类型
* @param args_ 事件参数
* @remarks
* 等待请求事件返回
*/
request<T extends keyof CT, T2 extends Parameters<CT[T]>, T3 extends ReturnType<CT[T]>>(type_: T | T[], ...args_: T2): Promise<T3>[];
/**
* 请求单个事件
* @param type_ 事件类型
Expand Down Expand Up @@ -534,7 +541,7 @@ declare namespace mk {
/**
* 加载步骤
* @remarks
* 加载步骤(场景/操作)前调用,可在此处打开遮罩
* 加载步骤(场景/操作)前调用
*/
loading_step(): void;
/**
Expand All @@ -545,7 +552,7 @@ declare namespace mk {
/**
* 加载步骤完成
* @remarks
* 步骤 load 执行后调用,可在此处关闭遮罩
* 步骤 load 执行后调用
*/
loading_step_complete(): void;
/** 中断 */
Expand Down Expand Up @@ -966,7 +973,7 @@ declare namespace mk {
*
* - 通过 cache_lifetime_ms_n 修复短时间内(释放/加载)同一资源导致加载资源是已释放后的问题
*
* - 解决同时加载同一资源多次导致返回的资源对象不一致的问(对象不一致会导致引用计数不一致)
* - 解决同时加载同一资源多次导致返回的资源对象不一致(对象不一致会导致引用计数不一致)
*
* - 增加强制性资源跟随释放对象
*/
Expand Down Expand Up @@ -1273,8 +1280,18 @@ declare namespace mk {
* 请不要使用 cc.game.restart(),因为这会影响框架内的数据清理以及生命周期
*/
restart(): Promise<void>;
/* Excluded from this release type: pause */
/* Excluded from this release type: resume */
/**
* 暂停节点
* @param node_ 目标节点
* @param recursion_b_ 是否递归子节点
*/
pause(node_: cc_2.Node, recursion_b_?: boolean): void;
/**
* 恢复节点
* @param node_ 目标节点
* @param recursion_b_ 是否递归子节点
*/
resume(node_: cc_2.Node, recursion_b_?: boolean): void;
}

/**
Expand Down Expand Up @@ -2870,10 +2887,9 @@ declare namespace mk {
* 设置存储数据
* @param key_ 存储键
* @param data_ 存储数据
* @param effective_time_ms_n_ 失效时间
* @returns storage.status
* @returns 成功状态
*/
set<T extends keyof CT>(key_: T, data_: any): boolean;
set<T extends keyof CT, T2 extends CT[T]>(key_: T, data_: T2): boolean;
/**
* 获取数据
* @param key_ 存储键
Expand Down

0 comments on commit a005b2c

Please sign in to comment.