We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
我觉得在ACTION_UP的时候去调用一下就好了。 我的理解是,erase()函数目的就是去判断一下刮奖有没有结束,完全可以只在ACTION_UP的时候去调用,而且在move的时候跳出了一个中奖结果用户体验也不太好,还是抬手后再判断比较好。
我试了下,在我的测试机mate8中,刮5%的情况下。 原来的思路CPU要26S后才会计算完所有的东西,而新的思路是抬手后的两秒。 内存倒区别不大。 详情见下面两图: ACTION_MOVE的时候每次都调用erase()函数 ACTION_UP的时候调用
The text was updated successfully, but these errors were encountered:
@DearZack erase()函数目的是刮去图层,onErase()函数才是判断是否结束,我觉得你这个思路不错,我优化下!
Sorry, something went wrong.
@DearZack 代码已优化,感谢提出宝贵的建议!
No branches or pull requests
我觉得在ACTION_UP的时候去调用一下就好了。
我的理解是,erase()函数目的就是去判断一下刮奖有没有结束,完全可以只在ACTION_UP的时候去调用,而且在move的时候跳出了一个中奖结果用户体验也不太好,还是抬手后再判断比较好。
我试了下,在我的测试机mate8中,刮5%的情况下。
原来的思路CPU要26S后才会计算完所有的东西,而新的思路是抬手后的两秒。
内存倒区别不大。
详情见下面两图:
ACTION_MOVE的时候每次都调用erase()函数
ACTION_UP的时候调用
The text was updated successfully, but these errors were encountered: