var dragonbonesData = RES.getRes("Robot_json");
var textureData = RES.getRes("texture_json");
var texture = RES.getRes("texture_png");
var dragonbonesFactory: dragonBones.EgretFactory = new dragonBones.EgretFactory();
dragonbonesFactory.addDragonBonesData(dragonBones.DataParser.parseDragonBonesData(dragonbonesData));
dragonbonesFactory.addTextureAtlas(new dragonBones.EgretTextureAtlas(texture, textureData));
var armature: dragonBones.Armature = dragonbonesFactory.buildArmature("robot");
this.aniGroup.addChild(armature.getDisplay());
armature.animation.play("Run");
armature.display.x =100;
armature.display.y =100;
/**
* 开启大时钟这步很关键
* */
dragonBones.WorldClock.clock.add(armature);
egret.Ticker.getInstance().register(function(advancedTime){
dragonBones.WorldClock.clock.advanceTime(advancedTime/1000);
},this);
白鹭EGRET使用龙骨DRAGONBONES骨骼动画
最新推荐文章于 2021-05-31 18:11:29 发布