Skip to content

发现个bug,Tween缺clear()函数,导致出错 #3

@SteveCruise

Description

@SteveCruise

Joystick的destroy内容如下:

 _destroy() {
    if (this.tweener) {
      this.tweener.clear();
      this.tweener = null;
    }
  }

它调用了Tween实例的clear()但是Tween类并没有clear(),导致渲染循环中的Update()执行出错

VM702:1 gameThirdScriptError
Cannot read property 'position' of null
TypeError: Cannot read property 'position' of null
    at Sprite.set (http://127.0.0.1:19127/game/libs/pixi.js:5724:48)
    at Function.update (http://127.0.0.1:19127/game/src/base/Tween.js:94:37)
    at App._update (http://127.0.0.1:19127/game/src/App.js:335:23)
    at App.loop (http://127.0.0.1:19127/game/src/App.js:341:12)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions