mirror of
https://github.com/Gongxh0901/kunpolibrary
synced 2025-04-10 21:51:04 +00:00
修改几个导致声明文件报错的声明;发布1.0.25
This commit is contained in:
parent
af3c5601ee
commit
8cd556774d
@ -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",
|
||||
|
@ -12,7 +12,7 @@ export abstract class ModuleBase extends Component implements IModule {
|
||||
/** 模块名称 */
|
||||
public moduleName: string;
|
||||
|
||||
/** 模块初始化 (内部使用) @internal */
|
||||
/** 模块初始化 (内部使用) */
|
||||
public init(): void { }
|
||||
|
||||
/** 模块初始化完成后调用的函数 */
|
||||
|
@ -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;
|
||||
}
|
@ -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)}秒)`);
|
||||
}
|
||||
|
||||
|
@ -78,6 +78,7 @@ export interface IWindow {
|
||||
|
||||
/**
|
||||
* 窗口尺寸发生改变时被调用
|
||||
* @internal
|
||||
*/
|
||||
screenResize(): void;
|
||||
|
||||
|
@ -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: {
|
||||
|
Loading…
x
Reference in New Issue
Block a user