mirror of
https://github.com/Gongxh0901/kunpolibrary
synced 2025-10-09 16:45:45 +00:00
添加内部属性标记
This commit is contained in:
@@ -11,6 +11,7 @@ import { Screen } from "./Screen";
|
||||
import { size } from "./header";
|
||||
|
||||
export abstract class Adapter {
|
||||
/** @internal */
|
||||
public init() {
|
||||
// 设计尺寸 不会变化
|
||||
let designSize = this.getDesignSize();
|
||||
@@ -25,6 +26,7 @@ export abstract class Adapter {
|
||||
});
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
protected resize(): void {
|
||||
Screen.SafeAreaHeight = 60;
|
||||
// 屏幕像素尺寸
|
||||
@@ -55,6 +57,7 @@ export abstract class Adapter {
|
||||
this.printScreen();
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
private printScreen() {
|
||||
info(`设计分辨率: ${Screen.DesignWidth}x${Screen.DesignHeight}`);
|
||||
info(`屏幕分辨率: ${Screen.ScreenWidth}x${Screen.ScreenHeight}`);
|
||||
|
@@ -7,6 +7,7 @@
|
||||
import { EventManager } from "../event/EventManager";
|
||||
|
||||
export class GlobalEvent {
|
||||
/** @internal */
|
||||
private static _globalEvent: EventManager = null;
|
||||
public static add(eventName: string, callback: (...args: any[]) => void, target: any): void {
|
||||
this._globalEvent.addEvent(eventName, callback, target);
|
||||
@@ -36,6 +37,7 @@ export class GlobalEvent {
|
||||
this._globalEvent.removeList(target);
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
public static _initGlobalEvent(): void {
|
||||
if (!this._globalEvent) {
|
||||
this._globalEvent = new EventManager();
|
||||
|
@@ -7,10 +7,12 @@
|
||||
import { Timer } from "../tool/timer/Timer";
|
||||
|
||||
export class GlobalTimer {
|
||||
/** @internal */
|
||||
private static _timer: Timer = null;
|
||||
/**
|
||||
* 初始化全局定时器,设置定时器间隔为16毫秒。
|
||||
* 此方法用于启动一个定时器实例,以便在整个应用程序中跟踪时间相关的操作。
|
||||
* @internal
|
||||
*/
|
||||
public static initTimer(): void {
|
||||
this._timer = new Timer(16);
|
||||
@@ -19,6 +21,7 @@ export class GlobalTimer {
|
||||
/**
|
||||
* 获取全局定时器实例。如果定时器尚未初始化,则进行初始化。
|
||||
* @returns {Timer} 全局定时器实例
|
||||
* @internal
|
||||
*/
|
||||
public static get Timer(): Timer {
|
||||
if (this._timer) {
|
||||
@@ -70,6 +73,11 @@ export class GlobalTimer {
|
||||
this.Timer.clear();
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新定时器
|
||||
* @param dt - 时间间隔
|
||||
* @internal
|
||||
*/
|
||||
public static update(dt: number): void {
|
||||
this._timer?.update(dt);
|
||||
}
|
||||
|
@@ -5,6 +5,7 @@
|
||||
*/
|
||||
import { Timer } from "../tool/timer/Timer";
|
||||
|
||||
/** @internal */
|
||||
export class InnerTimer {
|
||||
private static _timer: Timer = null;
|
||||
/**
|
||||
|
Reference in New Issue
Block a user