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

Add the switch of multi-touch. #5847

Merged
merged 1 commit into from Dec 11, 2019
Merged

Conversation

caryliu1999
Copy link
Contributor

@caryliu1999 caryliu1999 commented Dec 5, 2019

Re: cocos-creator/2d-tasks#2059

listener._claimedTouches.push(selTouch);
eventManager._currentTouch = selTouch;
Copy link
Contributor

@holycanvas holycanvas Dec 7, 2019

Choose a reason for hiding this comment

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

如果同时多根手指触摸屏幕,这个currentTouch会是哪个

Copy link
Contributor Author

@caryliu1999 caryliu1999 Dec 9, 2019

Choose a reason for hiding this comment

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

按照节点树的顺序,触发列表中hitTest检测成功的第一个,因为这里触发listener的时候是按照这个数组次序遍历执行的。

@holycanvas holycanvas requested review from jareguo and PPpro Dec 9, 2019
PPpro
PPpro approved these changes Dec 11, 2019
@holycanvas holycanvas merged commit fb2f044 into cocos:v2.3.0 Dec 11, 2019
1 check passed
@caryliu1999 caryliu1999 deleted the v2.3.0-muti-touch branch Jun 22, 2021
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

4 participants