Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix CCMotionStreak err for fireball/issues/5881 #1727

Merged
merged 1 commit into from Jun 12, 2017
Merged

Conversation

knoxHuang
Copy link
Contributor

Re: cocos-creator/fireball#5881

Changes proposed in this pull request:

  • 修复拖尾之前遗留的 bug(使用了 reset 无效)

@cocos-creator/engine-admins

},

onDisable: function () {
this.node.off('position-changed', this._onNodePositionChanged, this);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个事件只能监听到 node 本身的位移,监听不到父节点的位移,恐怕会有 bug 吧?

@@ -279,7 +288,6 @@ var MotionStreak = cc.Class({
var ty = worldMt.ty - (node.height / 2 + node.anchorY * node.height);
this._root.setPosition(-tx, -ty);
this._motionStreak.setPosition(tx, ty);
this._motionStreak.update(delta);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里把 update 函数调用去掉了不会有问题么。。。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

没问题,因为 update 会被执行

@jareguo jareguo merged commit 6aa097b into cocos:v1.5 Jun 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants