import { Entity, IEntityOptions } from "../../core/entity"; import { TransformComponent } from "../components/transform"; import { Undefinable } from '../../utils/types'; /** * @description : 元实体 包含空间信息的一切实体 * @param {*} * @return {*} * @example : */ export class MetaEntity extends Entity { constructor(options: IEntityOptions = {}) { super(options); const transfrom = new TransformComponent({ entity: this }) this.addComponent(transfrom); } get transfrom(): TransformComponent { return this._componentMap.get((TransformComponent as any).name) as any; } }