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 Issue#144 安卓版 Key 的暂停 Bug #223

Merged
merged 2 commits into from
Mar 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,11 @@ public void OnPointerExit(PointerEventData eventData)
Dispatch(InputType.Up);
}

public void ResetTouch()
{
isTouchDown = false;
Dispatch(InputType.Up);
}
Comment on lines +93 to +97
Copy link
Collaborator

Choose a reason for hiding this comment

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

Dispatch 是通过消息总线,以事件的方式直接发送到 note clip,并直接响应
直接派发消息看上去会导致 note 暂停时错误的判断 input 状态


private void Dispatch(InputType type)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ public override void EndReceive()
{
foreach (TouchInputReceiveObj obj in objs)
{
// TODO: 实现input层的抽象统一不同平台行为
obj.ResetTouch();
obj.gameObject.SetActive(false);
}
}
Expand Down