You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
10 lines
508 B
10 lines
508 B
/** 组件实例实际类型标记(addComponent 写入;getComponent 校验,防错桶) */
|
|
export const ECS_INSTANCE_TYPE = Symbol.for('mx.ecs.instanceTypeId');
|
|
|
|
/** ECS 组件基类(避开 cc.Component 命名,通用,无业务依赖) */
|
|
export class EcsComponent {}
|
|
|
|
/** 组件构造器类型(ecsTypeId 在 Release 压缩后仍唯一,避免 ctor.name 撞名合桶) */
|
|
export type ComponentCtor<T extends EcsComponent> = (new (...args: any[]) => T) & {
|
|
readonly ecsTypeId?: string;
|
|
};
|
|
|