* 每帧更新所有 Spine 动画 * @param e - 更新参数,包含帧间隔时间
(e: UpdateParams)
| 100 | * @param e - 更新参数,包含帧间隔时间 |
| 101 | */ |
| 102 | update(e: UpdateParams) { |
| 103 | for (let key in this.armatures) { |
| 104 | // TODO: 类型 |
| 105 | // @ts-ignore |
| 106 | this.armatures[key].update(e.deltaTime * 0.001); |
| 107 | } |
| 108 | // 处理等待容器就绪的 slot 挂载请求 |
| 109 | for (let key in this._spineComponents) { |
| 110 | this._spineComponents[key]._flushPendingSlotObjects(); |
| 111 | } |
| 112 | super.update(); |
| 113 | } |
| 114 | async componentChanged(changed: ComponentChanged) { |
| 115 | if (changed.componentName === 'Spine') { |
| 116 | if (changed.type === OBSERVER_TYPE.ADD) { |
nothing calls this directly
no test coverage detected