-
Notifications
You must be signed in to change notification settings - Fork 29
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
Strange behavior of OnTouched
#298
Comments
The background of |
Consider details about the process of "touching" between A & B, it can be devided into several stages:
If we define event
But if we provide event Actually in my opinion, in most cases developers care about For the other problem:
It should be considered an implementation bug of the engine. Whatever the event is ( |
* fix: Strange behavior of OnTouched #298 * Remove unused import * Rename onTouchBegin => onTouchStart * Remove touch interfaces of sprites * Remove alert in comment * Add OnTouchStart interfaces, Remove OnTouched and OnTouchEnd * Fix data race in test case * Rename *touched* to *touching* * Tutorial changed from touching to OnTouchStart
For sprite A with code:
The callback will not be called when A collides with another sprite (referred as B).
The callback is called when A collides with B, and method
Touching
of B is called with A, for example:It's strange, but may be intended. @xushiwei can you offer any hint?
Related PR: #68
P.S. There is no similar API in Scratch
The text was updated successfully, but these errors were encountered: