DragonBones / DragonBonesJS

DragonBones TypeScript / JavaScript Runtime
MIT License
746 stars 320 forks source link

All phaser 3.x demos run #107

Closed taoabc closed 5 years ago

taoabc commented 5 years ago
  1. Change factory's createArmature function 2nd parameter dragonBonesName optional to required, because it can not finded when name is empty.
  2. Change addDown/UpCallback to input.on('pointdown/up') that newer phaser removed.
  3. Add add.dragonBones to fix there is no DragonBones data for replace slot.
  4. Test every demo except BoundingBox looks like not work (but better than earlier).

Chinese: 英语可能不准确,以下是中文版。 该次提交让所有的phaser 3例子都可以跑通,主要更改如下:

更改factory的createArmature函数的第二个参数 dragonBonesName 为必填参数,因为如果不填,会导致找不到龙骨文件。 更改输入事件监听,新版本的phaser不再支持addDownCallback/addUpCallback。 增加单独添加 dragonBones 回调,以前的版本如果没有调用createArmature,则龙骨数据不会被添加,此时使用ReplaceSlot,会找不到龙骨文件导致替换失败。 每个例子现在都可以运行,但是BoundingBox看起来是有点问题的,希望大家帮忙看看(不过至少比以前报错没有显示好太多)。