egret 龙骨操作,返回龙骨显示对象

    /**
     * 返回一个龙骨显示对象
     * name 骨架的名字
     * dragonbonesData_json 龙骨数据资源id
     * textureData_json 贴图数据资源id
     * texture_png  贴图资源id
     */
    private dragonbonesFactory:dragonBones.EgretFactory;     //骨架工厂
    private createEgretArmatureDisplay(dragonbonesData_json,textureData_json,texture_png,name):dragonBones.EgretArmatureDisplay{
        var dragonbonesData = RES.getRes( dragonbonesData );  
        var textureData = RES.getRes( textureData );  
        var texture = RES.getRes( texture );

        this.dragonbonesFactory = new dragonBones.EgretFactory();  
        this.dragonbonesFactory.addDragonBonesData(dragonBones.DataParser.parseDragonBonesData(dragonbonesData));  
        this.dragonbonesFactory.addTextureAtlas(new dragonBones.EgretTextureAtlas(texture,textureData));
        return this.dragonbonesFactory.buildArmatureDisplay(name);
    }

返回龙骨操作显示对象。方便以后复制黏贴。

你可能感兴趣的:(egret)