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

发现小bug #2

Open
fangxianzheng opened this issue Sep 13, 2016 · 1 comment
Open

发现小bug #2

fangxianzheng opened this issue Sep 13, 2016 · 1 comment

Comments

@fangxianzheng
Copy link

鼠标跟随那个;当箭头在原地时,箭头不停地来回变换方向,这是个bug;解决方案。在arrow.x += vx;这一句之前加上if(Math.abs(dx) < speed && Math.abs(dy) < speed){vx = 0;vy = 0;}
当然这是在speed数值较小时,较大时我也暂时不知道怎么做,希望有高人指点。

@supperjet
Copy link
Owner

不好意思最近有点忙,已经做调整。

在 2016-09-13 15:48:52,"方贤正" [email protected] 写道:

鼠标跟随那个;当箭头在原地时,箭头不停地来回变换方向,这是个bug;解决方案。在arrow.x += vx;这一句之前加上if(Math.abs(dx) < speed && Math.abs(dy) < speed){vx = 0;vy = 0;}
当然这是在speed数值较小时,较大时我也暂时不知道怎么做,希望有高人指点。


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

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

No branches or pull requests

2 participants