规范jsdoc注释

This commit is contained in:
YHH
2025-09-24 10:45:33 +08:00
parent 0b4244fd8e
commit 6cbbc06998
6 changed files with 38 additions and 3 deletions
@@ -425,7 +425,7 @@ export abstract class EntitySystem implements ISystemBase {
*
* @param entities 要处理的实体列表
*/
protected process(_entities: Entity[]): void {
protected process(entities: Entity[]): void {
// 子类必须实现此方法
}
@@ -529,7 +529,7 @@ export abstract class EntitySystem implements ISystemBase {
*
* @param entity 被添加的实体
*/
protected onAdded(_entity: Entity): void {
protected onAdded(entity: Entity): void {
// 子类可以重写此方法
}
@@ -540,7 +540,7 @@ export abstract class EntitySystem implements ISystemBase {
*
* @param entity 被移除的实体
*/
protected onRemoved(_entity: Entity): void {
protected onRemoved(entity: Entity): void {
// 子类可以重写此方法
}
}
@@ -11,6 +11,7 @@ export class ComponentDataCollector {
/**
* 收集组件数据(轻量版,不计算实际内存大小)
* @param scene 场景实例
*/
public collectComponentData(scene?: IScene | null): IComponentDebugData {
if (!scene) {
@@ -167,6 +168,8 @@ export class ComponentDataCollector {
/**
* 为内存快照功能提供的详细内存计算
* 只在用户主动请求内存快照时调用
* @param typeName 组件类型名称
* @param scene 场景实例
*/
public calculateDetailedComponentMemory(typeName: string, scene?: IScene | null): number {
if (!scene) return this.getEstimatedComponentSize(typeName, scene);
@@ -31,6 +31,11 @@ export class DebugManager {
private sendInterval: number;
private isRunning: boolean = false;
/**
*
* @param core Core实例
* @param config
*/
constructor(core: any, config: IECSDebugConfig) {
this.config = config;
@@ -9,6 +9,10 @@ import { IScene } from '../../ECS/IScene';
*
*/
export class EntityDataCollector {
/**
*
* @param scene
*/
public collectEntityData(scene?: IScene | null): IEntityDebugData {
if (!scene) {
return this.getEmptyEntityDebugData();
@@ -50,6 +54,10 @@ export class EntityDataCollector {
}
/**
*
* @param scene
*/
public getRawEntityList(scene?: IScene | null): Array<{
id: number;
name: string;
@@ -86,6 +94,11 @@ export class EntityDataCollector {
}
/**
*
* @param entityId ID
* @param scene
*/
public getEntityDetails(entityId: number, scene?: IScene | null): any {
try {
if (!scene) return null;
@@ -152,6 +165,10 @@ export class EntityDataCollector {
}
/**
*
* @param scene
*/
public collectEntityDataWithMemory(scene?: IScene | null): IEntityDebugData {
if (!scene) {
return this.getEmptyEntityDebugData();
@@ -751,6 +768,9 @@ export class EntityDataCollector {
/**
*
* @param entityId ID
* @param componentIndex
* @param scene
*/
public getComponentProperties(entityId: number, componentIndex: number, scene?: IScene | null): Record<string, any> {
try {
@@ -943,6 +963,10 @@ export class EntityDataCollector {
/**
*
* @param entityId ID
* @param componentIndex
* @param propertyPath
* @param scene
*/
public expandLazyObject(entityId: number, componentIndex: number, propertyPath: string, scene?: IScene | null): any {
try {
@@ -9,6 +9,7 @@ export class SceneDataCollector {
/**
*
* @param scene
*/
public collectSceneData(scene?: IScene | null): ISceneDebugData {
if (!scene) {
@@ -8,6 +8,8 @@ import { IScene } from '../../ECS/IScene';
export class SystemDataCollector {
/**
*
* @param performanceMonitor
* @param scene
*/
public collectSystemData(performanceMonitor: any, scene?: IScene | null): ISystemDebugData {
if (!scene) {