module els{ export class BaseObject extends egret.EventDispatcher{ private static _uniqueID: number = 0; private _id: number = 0; /**编辑类型,0:可以添加到场景中,1:内置,不能添加到场景中 */ editType: number = 0; UID: number = 0; name: string; constructor() { super(); this._id = BaseObject._uniqueID; BaseObject._uniqueID++; } get id() { return this._id; } destroy() { } clone(): BaseObject{ let object: BaseObject = new BaseObject(); object.name = this.name; object.editType = this.editType; return object; } } }