diff --git a/package.json b/package.json index c0c6dc2..ff6921b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "kunpocc", - "version": "1.0.24", + "version": "1.0.25", "description": "基于creator3.0+的kunpocc库", "main": "./dist/kunpocc.cjs", "module": "./dist/kunpocc.mjs", diff --git a/src/module/ModuleBase.ts b/src/module/ModuleBase.ts index 9825654..6752cbb 100644 --- a/src/module/ModuleBase.ts +++ b/src/module/ModuleBase.ts @@ -12,7 +12,7 @@ export abstract class ModuleBase extends Component implements IModule { /** 模块名称 */ public moduleName: string; - /** 模块初始化 (内部使用) @internal */ + /** 模块初始化 (内部使用) */ public init(): void { } /** 模块初始化完成后调用的函数 */ diff --git a/src/tool/Math.ts b/src/tool/Math.ts index 30555cc..739bc7a 100644 --- a/src/tool/Math.ts +++ b/src/tool/Math.ts @@ -44,27 +44,4 @@ export class MathTool { } return out; } - - /** - * 内部使用的辅助方法,用于计算平滑过渡的因子 - * @internal - */ - public static calculateSmoothFactor(elapsedTime: number, responseTime: number): number { - return elapsedTime / (elapsedTime + responseTime); - } - - /** - * 内部使用的工具方法,不应该在库外部使用 - * @internal - */ - public static internalRoundToDecimal(value: number, decimals: number): number { - const factor = Math.pow(10, decimals); - return Math.round(value * factor) / factor; - } - - /** - * 内部使用的辅助常量 - * @internal - */ - public static readonly INTERNAL_EPSILON = 0.00001; } \ No newline at end of file diff --git a/src/tool/Time.ts b/src/tool/Time.ts index 6ee982f..055d24b 100644 --- a/src/tool/Time.ts +++ b/src/tool/Time.ts @@ -45,11 +45,11 @@ export class Time { public static get netTimeDiff(): number { return this._netTimeDiff; } /** 获取系统运行时间 */ - public static get runTime(): number { return game.totalTime }; + public static get runTime(): number { return Math.floor(game.totalTime); } public static _configBoot(): void { - this._osBootTime = Date.now(); + this._osBootTime = Math.floor(Date.now()); log("系统启动时间", this._osBootTime); TimeCache = new Date(); this._nowTimestamp = (): number => { @@ -67,7 +67,7 @@ export class Time { } this._netTime = netTime; const localTime = this._nowTimestamp(); - this._netTimeDiff = this.netTime - localTime; + this._netTimeDiff = Math.floor(this.netTime - localTime); log(`设置网络时间: net(${this.formatTime(this.netTime)}), boot(${this.formatTime(this.osBootTime)}), diff(${Math.abs(this.netTimeDiff / 1000)}秒)`); } diff --git a/src/ui/IWindow.ts b/src/ui/IWindow.ts index 4c94787..8d6ac19 100644 --- a/src/ui/IWindow.ts +++ b/src/ui/IWindow.ts @@ -78,6 +78,7 @@ export interface IWindow { /** * 窗口尺寸发生改变时被调用 + * @internal */ screenResize(): void; diff --git a/src/ui/UIDecorator.ts b/src/ui/UIDecorator.ts index 708b5b8..67e3f8d 100644 --- a/src/ui/UIDecorator.ts +++ b/src/ui/UIDecorator.ts @@ -12,7 +12,6 @@ export namespace _uidecorator { const UICBMeta = "__uicbmeta__" - /** @internal */ interface IUIInfoBase { /** 构造函数 */ ctor: any; @@ -24,7 +23,6 @@ export namespace _uidecorator { /** * 窗口属性注册数据结构 - * @internal */ interface UIWindowInfo extends IUIInfoBase { /** 配置信息 */ @@ -72,7 +70,6 @@ export namespace _uidecorator { /** * 组件属性注册数据结构 - * @internal */ interface IUIComInfo extends IUIInfoBase { /** 配置信息 */ @@ -111,10 +108,7 @@ export namespace _uidecorator { }; } - /** - * header属性注册数据结构 - * @internal - */ + /** header属性注册数据结构 */ interface IUIHeaderInfo extends IUIInfoBase { /** 配置信息 */ res: {