module els{ export class DragonBonesRenderer extends Renderer{ url: string; textureConfigUrl: string; skeletonUrl: string; loopTimes: number; defaultAnimation: string; defaultArmature: string; private _dbContainer: egret.Sprite; private _texture: egret.Texture; constructor() { super(); this._dbContainer = new egret.Sprite(); this._renderer.addChild(this._dbContainer); } onAwake() { RES.getResByUrl(this.url, (texture:egret.Texture) => { this._texture = texture; }, this, RES.ResourceItem.TYPE_IMAGE); } clone(): DragonBonesRenderer { let component: DragonBonesRenderer = new DragonBonesRenderer(); component.enabled = this.enabled; component.url = this.url; component.textureConfigUrl = this.textureConfigUrl; component.skeletonUrl = this.skeletonUrl; component.loopTimes = this.loopTimes; component.defaultAnimation = this.defaultAnimation; component.defaultArmature = this.defaultArmature; return component; } } }