规范jsdoc注释
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user